Skip to content
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

Always pass type argument to .startNode #16417

Merged
merged 1 commit into from Apr 7, 2024

Conversation

nicolo-ribaudo
Copy link
Member

Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

I was working on unifying AST type definitions across @babel/parser and @babel/types, and noticed that in many places in @babel/parser variables are typed as N.Node (which is the AST equivalent of any). This PR fixes that.

I plan to eventually open a PR to, when possible, move the type string from finishNode to startNode so that the type can be inferred better.

@nicolo-ribaudo nicolo-ribaudo added PR: Internal 🏠 A type of pull request used for our changelog categories pkg: parser labels Apr 7, 2024
@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/56704

@nicolo-ribaudo nicolo-ribaudo merged commit 08b0472 into babel:main Apr 7, 2024
50 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the unify-ast-definitions branch April 7, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: parser PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants