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

[typescript] Option to remove only type imports #448

Closed
intrnl opened this issue Oct 11, 2020 · 1 comment
Closed

[typescript] Option to remove only type imports #448

intrnl opened this issue Oct 11, 2020 · 1 comment

Comments

@intrnl
Copy link

intrnl commented Oct 11, 2020

The option to remove only type imports that was introduced with TS 3.8 would be nice, that would remove the need to remove unused imports, which might be needed (if we're combining esbuild with some other transformations like svelte compiler)

// only remove this
import type { Type } from 'foo';
// don't remove this
import { unusedImport } from 'foo';
@evanw
Copy link
Owner

evanw commented Oct 11, 2020

I just read up on this a bit. It looks like the matching config option from TypeScript is called importsNotUsedAsValues and was introduced by microsoft/TypeScript#35200. Whatever solution that ends up being used here should be mindful of that precedent.

@evanw evanw closed this as completed in 2f31833 Oct 13, 2020
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

2 participants