Closed o-frietsch closed 1 year ago
Consider this test code:
import * as acorn from 'acorn' import tsPlugin from 'acorn-typescript' const node = acorn.Parser.extend(tsPlugin()).parse(` const someArrowFunc = (bla: any, hey?: any) => 42; `, { sourceType: 'module', ecmaVersion: 'latest', locations: true }); console.log(JSON.stringify(node, null, 2));
It will raise an "Unexpected token" exception because the hey parameter is optional. Removing the ? character immediately makes the exception disappear.
hey
?
I will check it
This has been fixed at version 1.3.2
Wow. Really great response time!!! Thank you very much!
Consider this test code:
It will raise an "Unexpected token" exception because the
hey
parameter is optional. Removing the?
character immediately makes the exception disappear.