oxc_parser emits TS1477 ("An instantiation expression cannot be followed by a property access") for parenthesized instantiation expressions. This behavior differs from tsc.
a<b>.c is a proper TS1477
(a<b>).c is a TS1477 for oxc_parser but not tsc 6.0.3
oxc_parser will correctly preserve the parens when the parser runs with preserve_parens: true, but oxfmt runs with preserve_parens: false, which causes oxfmt to report a TS1477 error.
What's expected?
(a<b>).c should parse without a TS1477 error regardless of preserve_parens, matching tsc. The decision should come from whether the LHS was parenthesized in the source not from whether a ParenthesizedExpression node happens to survive into the AST. (The unparenthesized a<b>.c must still be a TS1477.)
OXC Playground reproduction
oxc_parseremits TS1477 ("An instantiation expression cannot be followed by a property access") for parenthesized instantiation expressions. This behavior differs from tsc.a<b>.cis a proper TS1477(a<b>).cis a TS1477 for oxc_parser but not tsc 6.0.3oxc_parser will correctly preserve the parens when the parser runs with
preserve_parens: true, but oxfmt runs withpreserve_parens: false, which causes oxfmt to report a TS1477 error.What's expected?
(a<b>).cshould parse without a TS1477 error regardless of preserve_parens, matching tsc. The decision should come from whether the LHS was parenthesized in the source not from whether a ParenthesizedExpression node happens to survive into the AST. (The unparenthesizeda<b>.cmust still be a TS1477.)OXC Playground reproduction