You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid future conflicts with new ES syntax. Eg: we already support Match syntax, but there is a proposal ECMAScript Pattern Matching, once it reachs higher stage, most likly ESTree will use Pattern or Match as a prefix for these nodes.
Prettier currently supports 330 types of node (exclude 8 from flow v0.294), sometimes it's hard to tell which node is from Flow, typescript-eslint prefixes the node with TS, and our Angular related node also use NG as a prefix, they are easy to identify.
Something for us to consider. If we are going to redo our AST node output, now that Flow has adopted most of TypeScript's syntax, should we output TS-prefixed nodes where the syntax is the same? That would simplify some tooling. There would still be differences that would need to be handled however.
TSFoo with a parent FLOWBar seems weird to me, and may also confuse.
If we want to align with TypeScript, I assume we will follow typescript-eslint.
There are some bad designs for some of their AST shape. For example, the current AST in Flow for as const makes more sense to me. I already asked them to update the AST in the past few years, will we strictly follow?
Activity
[-]Add a prefix to Flow specific node type[/-][+]Add a prefix to Flow specific AST node type[/+]gkz commentedon Dec 18, 2025
Something for us to consider. If we are going to redo our AST node output, now that Flow has adopted most of TypeScript's syntax, should we output
TS-prefixed nodes where the syntax is the same? That would simplify some tooling. There would still be differences that would need to be handled however.fisker commentedon Dec 20, 2025
I'm not sure if this is a good idea.
TSFoowith a parentFLOWBarseems weird to me, and may also confuse.If we want to align with TypeScript, I assume we will follow
typescript-eslint.There are some bad designs for some of their AST shape. For example, the current AST in Flow for
as constmakes more sense to me. I already asked them to update the AST in the past few years, will we strictly follow?On the other hand,
This is true.
So, I'm fine with whatever decision you make.
fisker commentedon Jan 23, 2026
RecordExpressionwas available in babel7, the proposal is dead now. https://github.com/tc39/proposal-record-tuple