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
Improve AST node definitions in @babel/types #12510
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/35474/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 06cdbb7:
|
@@ -1542,6 +1544,7 @@ export interface ClassPrivateProperty extends BaseNode { | |||
value: Expression | null; | |||
decorators: Array<Decorator> | null; | |||
static: any; | |||
typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; |
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.
typeAnnotation
is an optional property: Babel does not assign it to AST unless flow
or typescript
plugin are enabled.
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.
added the same definition as in ClassProperty
Could you rebase and re-build the generated type definitions? |
yes, will do |
…tch parser results updated definitions for EnumBooleanBody EnumNumberBody EnumStringBody
a1a7848
to
06cdbb7
Compare
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.
Thanks!
After adding
node
argument type annotations for @babel/generator (in #12487) found some incomplete or not correct AST node definitions - extracted it into separate PR