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

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

Merged
merged 2 commits into from Jul 6, 2019

Conversation

benjamn
Copy link
Contributor

@benjamn benjamn commented Jul 6, 2019

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
@@ -1,4 +1,7 @@
const enum TestResult { PASS, FAIL }
Copy link
Contributor Author

@benjamn benjamn Jul 6, 2019

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 added 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.

None yet

1 participant