(traverse, node, path, state)
| 13359 | } |
| 13360 | |
| 13361 | function renderParams(traverse, node, path, state) { |
| 13362 | // To preserve inline typechecking directives, we |
| 13363 | // distinguish between parens-free and paranthesized single param. |
| 13364 | if (isParensFreeSingleParam(node, state) || !node.params.length) { |
| 13365 | utils.append('(', state); |
| 13366 | } |
| 13367 | if (node.params.length !== 0) { |
| 13368 | path.unshift(node); |
| 13369 | traverse(node.params, path, state); |
| 13370 | path.unshift(); |
| 13371 | } |
| 13372 | utils.append(')', state); |
| 13373 | } |
| 13374 | |
| 13375 | function isParensFreeSingleParam(node, state) { |
| 13376 | return node.params.length === 1 && |
no test coverage detected