Closed royling closed 5 years ago
Originally, I intended the above to be approximately the same as this:
const g = (a, b, ...c) => f(a, 0, ...c, b);
const h = (a, ...b) => f(...b, a, 0, ...b);
However, following discussions at the September TC39 meeting, I think the following restriction makes sense:
?
, nor ...
may follow ...
in an argument list.That would make both g
and h
above an error, though we could loosen this restriction slightly if we implement #5.
Closing as ...
is currently disallowed as of the latest draft of this proposal.
When mixing
?
and...
tokens, I guess only a set of syntaxes are valid imaging how the parser is going to work. Would you mind confirming the validity of the following syntaxes?