@babel/types to TS (#12431)
* babel-types flowts convert * babel-types code generation updates * babel-types add more generated types to src (copy logic from scripts/typescript) * babel-types update generateBuilders to specify exact argument types * babel-types fix deprecated types generation * babel-types fixes * babel-types fix potential bug * babel-types update generateBuilders, to include proper return types * babel-types backport types from generated index.d.ts to be included in sources * babel-types fixes * babel-types avoid export of builders starting with upper case in ts sources * babel-types * babel-types todo updates, small fixes * babel-types generate helpers * babel-types remove typescript definitions generation * babel-types generate files * babel-types copy d.ts file for deprecated ast node creators into lib folder * babel-types use t as alias for ast node types namespace * babel-types update generateBuilders script to use "t" as alias instead of "types" * babel-types update deprecated builders generation to have more compact file * babel-types publish the .d.ts file for `@babel/types` * Publish the .d.ts file for `@babel/types` * Fix flowcheck * Prettier * No need to lint generated .d.ts files (now they are generated by tsc) * Run prepublish-prepare-dts from prepublish-build * Fix Babel 8 tests * Update codecov config * babel-types more improvements - better type for gatherSequenceExpressions - mark createUnionTypeAnnotation as deprecated - fix createTSUnionType - babel-types better type for builder - other improvements from PR comments * babel-types lint fix * babel-types fix createTSUnionType * Don't commit .d.ts file in lib, and rename "deprecated"->"uppercase" for builders * Add back types for TS 3.7 * Update packages/babel-types/package.json * Cleanup converters types Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
The compiler for writing next generation JavaScript.
Supporting Babel
Babel (pronounced "babble") is a community-driven project used by many companies and projects, and is maintained by a group of volunteers. If you'd like to help support the future of the project, please consider:
- Giving developer time on the project. (Message us on Twitter or Slack for guidance!)
- Giving funds by becoming a sponsor on Open Collective or Patreon!
Sponsors
Our top sponsors are shown below! [Become a sponsor]
Intro
Babel is a tool that helps you write code in the latest version of JavaScript. When your supported environments don't support certain features natively, Babel will help you compile those features down to a supported version.
In
// ES2020 nullish coalescing
function greet(input) {
return input ?? "Hello world";
}
Out
function greet(input) {
return input != null ? input : "Hello world";
}
Try it out at our REPL.
FAQ
Who maintains Babel?
Mostly a handful of volunteers, funded by you! Please check out our team page!
Is there a Babel song?
I'm so glad you asked: Hallelujah —— In Praise of Babel by @angus-c, audio version by @swyx. Tweet us your recordings!
Looking for support?
For questions and support please join our Slack Community (you can sign up here for an invite), ask a question on Stack Overflow, or ping us on Twitter.
Where are the docs?
Check out our website: babeljs.io, and report issues/features at babel/website.
Want to report a bug or request a feature?
Please read through our CONTRIBUTING.md and fill out the issue template at babel/issues!
Want to contribute to Babel?
Check out:
- Our #development Slack channel and say hi! (sign-up)
- Issues with the good first issue and help wanted label. We suggest also looking at the closed ones to get a sense of the kinds of issues you can tackle.
Some resources:
- Our CONTRIBUTING.md to get started with setting up the repo.
- Our discussions/notes/roadmap: babel/notes
- Our progress on TC39 proposals: babel/proposals
- Our blog which contains release posts and explanations: /blog
- Our videos page with talks about open source and Babel: /videos
- Our podcast
How is the repo structured?
The Babel repo is managed as a monorepo that is composed of many npm packages.