-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
support remove type only import like tsc #756
Comments
swc version: "@swc/cli": "^0.1.24", |
How can we know if funcA is type-only import? If you use funcA only in type position, swc treat the import as type-only import and will remove it. |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
support remove type only import like tsc
tsc example
now use tsc with cmd: tsc -m "amd" -t "es2015" src/test.ts
we get the code:
swc example
run swc, we get code as follow, note the a module already exist.
typescript reference, Module side-effects
https://github.com/microsoft/TypeScript/wiki/FAQ#Modules
https://www.typescriptlang.org/docs/handbook/modules.html
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-exports
The text was updated successfully, but these errors were encountered: