Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.

Use actual TypeScript instead of @babel/preset-typescript. - #25

Merged
benjamn merged 2 commits into
masterfrom
use-actual-typescript-instead-of-babel-preset
Jul 6, 2019
Merged

benjamn merged 2 commits into
masterfrom
use-actual-typescript-instead-of-babel-preset

Conversation

@benjamn

@benjamn benjamn commented Jul 6, 2019

Copy link
Copy Markdown
Contributor

Babel's TypeScript implementation has a few unfortunate caveats: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats

Most notably, the lack of full support for namespaces is painful:

By precompiling TypeScript code with the actual TypeScript compiler, we can support features like namespaces without relying on Babel. Of course, Babel still handles everything after TypeScript syntax has been removed.

Babel's TypeScript implementation has a few unfortunate caveats:
https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats

Most notably, the lack of *full* support for namespaces is painful:
babel/babel#8244
babel/babel#9785

By precompiling TypeScript code with the actual TypeScript compiler, we
can support features like namespaces without relying on Babel. Of course,
Babel still handles everything after TypeScript syntax has been removed.
@benjamn benjamn self-assigned this Jul 6, 2019
Comment thread test/class-properties.ts
@@ -1,4 +1,7 @@
const enum TestResult { PASS, FAIL }

@benjamn benjamn Jul 6, 2019 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This verifies that the const enum caveat no longer applies.

@benjamn
benjamn merged commit 40b260e into master Jul 6, 2019
@benjamn
benjamn deleted the use-actual-typescript-instead-of-babel-preset branch July 6, 2019 15:10
benjamn pushed a commit to meteor/meteor that referenced this pull request Jul 6, 2019
TypeScript is now supported by the actual TypeScript compiler, rather than
by @babel/preset-typescript: meteor/babel#25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant