Skip to content

Commit

Permalink
TS import = and export = are not supported (#2789)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed May 23, 2023
1 parent 9b027c3 commit 660bed3
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions docs/plugin-transform-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,6 @@ Because there are features of the TypeScript language which rely on the full typ

1. Since Babel does not type-check, code which is syntactically correct, but would fail the TypeScript type-checking may successfully get transformed, and often in unexpected or invalid ways.

1. This plugin does not support [`export =`][exin] and [`import =`][exin], because those cannot be compiled to ES.next. These are a TypeScript only form of `import`/`export`.

**Workarounds**:

- Use the plugin [babel-plugin-replace-ts-export-assignment](https://www.npmjs.com/package/babel-plugin-replace-ts-export-assignment) to transform `export =`.
- Convert to using `export default` and `export const`, and `import x, {y} from "z"`.

1. Changes to your `tsconfig.json` are not reflected in babel. The build process will always behave as though [`isolatedModules`][iso-mods] is turned on, there are Babel-native alternative ways to set a lot of the [`tsconfig.json` options](#typescript-compiler-options) however.

1. **Q**: Why doesn't Babel allow export of a `var` or `let`?
Expand Down

0 comments on commit 660bed3

Please sign in to comment.