Closed kungfooman closed 2 weeks ago
/** * @param {number[]} [nodes] - Defaults to []. */ function test(nodes = []) { return nodes; } const ret = test([1, 2, 3]); console.log('ret', ret);
Currently it believes the last ] from the comment belongs to the type, resulting in this error:
]
Asserter.js:178 generateTypeChecks> test> todo implement AssignmentPattern for parameter nodes] warn @ Asserter.js:178 generateTypeChecks @ Asserter.js:549 BlockStatement @ Stringifier.js:555
Currently it believes the last
]
from the comment belongs to the type, resulting in this error: