-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Types cleanup #5597
Types cleanup #5597
Conversation
export interface EmptyStatement extends Statement { } | ||
|
||
// @kind(SyntaxKind.DebuggerStatement) | ||
export interface DebuggerStatement extends Statement { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding brands to these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not litter all of the interfaces with brands. They seem more valuable when disambiguating structurally similar nodes that may not be legally valid in certain parts of the tree (such as LeftHandSideExpression
vs Expression
).
If we ever end up with Enum type literals, I might change it to:
export interface EmptyStatement extends Statement {
kind: SyntaxKind.EmptyStatement;
}
...
👍 |
export interface DebuggerStatement extends Statement { } | ||
|
||
// @kind(SyntaxKind.MissingDeclaration) | ||
// @factoryhidden("name", true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does facroryhidden and factoryParam mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, meant to remove those.
👍 |
Adds explicit interfaces for various syntax kinds, adding some additional restrictions to types whose definition is too broad.
This is needed to support #5595.