-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
chore(gatsby): Convert babel-parse-to-ast to TypeScript #22480
chore(gatsby): Convert babel-parse-to-ast to TypeScript #22480
Conversation
adc412d
to
4e099d4
Compare
4e099d4
to
08ac352
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.
This looks great to me, let's merge it!
Thank you so much for contributing to our TypeScript refactor! We have more work to do and we would love to have you stay involved in our transition. Please submit more PRs! 💜
Holy buckets, @john015 — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
Published in [email protected] |
Description
Convert
src/utils/babel-parse-to-ast.js
to TypeScript.I could not use
ParserOptions
Interface exported by@babel/parser
to declare the return value of the getBabelParserOptions function.Because the
ParserOptions
interface andPARSER_OPTIONS
declared in thebabel-parse-to-ast.js
file are incompatible.So instead of
ParserOptions
interface, I temporarily declared the return value of thegetBabelParserOptions
function asobject
type.Related Issues
Related to #21995