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

@babel/preset-typescript #25

Open
2zH opened this issue Feb 2, 2019 · 1 comment
Open

@babel/preset-typescript #25

2zH opened this issue Feb 2, 2019 · 1 comment

Comments

@2zH
Copy link
Owner

2zH commented Feb 2, 2019

@2zH 2zH changed the title Babel-preset-typescripts @babel/preset-typescript Feb 2, 2019
@2zH
Copy link
Owner Author

2zH commented Feb 2, 2019

First

Babel won’t perform type-checking on TypeScript code; it will only be transforming your code, and it will compile regardless of whether type errors are present.

Second

there are certain constructs that don’t currently compile in Babel 7. Specifically

  • namespaces
  • bracket style type-assertion/cast syntax regardless of when JSX is enabled (i.e. writing x won’t work even in .ts files if JSX support is turned on, but you can instead write x as Foo).
  • enums that span multiple declarations (i.e. enum merging)
  • legacy-style import/export syntax (i.e. import foo = require(...) and export = foo)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant