Closed ikatyang closed 6 years ago
What version of TypeScript are you using? 2.8.1
What version of typescript-eslint-parser are you using? 14.0.0
typescript-eslint-parser
What code were you trying to parse?
var newArray = /** @type {Array} */ (numberOrString).map(x => x);
What did you expect to happen? TSParenthesizedExpression should exist since it's used by TypeScript's checkJS mode, see also prettier/prettier#4287.
TSParenthesizedExpression
What happened? not exist
I guess we can simply add a parenthesized: boolean prop for expressions so that the AST structure won't be affected.
parenthesized: boolean
Just found another way to fix the problem in Prettier (prettier/prettier#4648).
What version of TypeScript are you using? 2.8.1
What version of
typescript-eslint-parser
are you using? 14.0.0What code were you trying to parse?
What did you expect to happen?
TSParenthesizedExpression
should exist since it's used by TypeScript's checkJS mode, see also prettier/prettier#4287.What happened? not exist