From d4453d6caa9d9adfb4e3d8103fba16170604be88 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Fri, 5 Jun 2020 13:08:51 -0700 Subject: [PATCH] fix: Handle spread args on function definitions --- src/components/FunctionDefinition.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/FunctionDefinition.js b/src/components/FunctionDefinition.js index cee1ea8ab..82ccdd67e 100644 --- a/src/components/FunctionDefinition.js +++ b/src/components/FunctionDefinition.js @@ -21,7 +21,9 @@ const FunctionDefinition = ({ params, returnValue }) => { {params.map((param, i) => (
- {param.name}: + + {param.type.startsWith('...') ? `...${param.name}` : param.name}:{' '} + {param.type}