Skip to content

Commit

Permalink
Fix docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
fubark committed Aug 26, 2024
1 parent 0232637 commit 9faa327
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/gen-docs.cy
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,10 @@ func genFuncDecl(decl Map) String:
var docLine = decl.get('docs') ?else ''
var params = {_}
for decl['params'] -> param:
var typeSpec = if (param['typeSpec'] != '') param['typeSpec'] else 'any'
params.append("$(param['name']) $(typeSpec)")
if param['typeSpec'] != '':
params.append("$(param['name']) $(param['typeSpec'])")
else:
params.append("$(param['name'])")
var paramsStr = params.join(', ')
return "> `func $(decl['name'])($(paramsStr)) $(decl['ret'])`\n>\n>$(docLine)\n\n"

Expand Down

0 comments on commit 9faa327

Please sign in to comment.