Skip to content

Commit

Permalink
fix: Handle spread args on function definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 5, 2020
1 parent 811b122 commit d4453d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/FunctionDefinition.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const FunctionDefinition = ({ params, returnValue }) => {
</span>
{params.map((param, i) => (
<div key={i} className={styles.param}>
<span className={styles.paramName}>{param.name}: </span>
<span className={styles.paramName}>
{param.type.startsWith('...') ? `...${param.name}` : param.name}:{' '}
</span>
<span className={styles.type}>{param.type} </span>
<Markdown
source={param.description}
Expand Down

0 comments on commit d4453d6

Please sign in to comment.