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

does not account for elided typescript type imports #58

Closed
no-stack-dub-sack opened this issue Apr 28, 2018 · 1 comment
Closed

does not account for elided typescript type imports #58

no-stack-dub-sack opened this issue Apr 28, 2018 · 1 comment
Labels

Comments

@no-stack-dub-sack
Copy link

When you import a typescript type from a module, and nothing else from that module is used anywhere in an expression, typescript omits the module's code, and just imports the type, meaning the import cost of importing the type is not the cost of importing the entire module.

For example:

import { IComponentOptions } from 'angular'; // 168.3K

However, the import cost is really practically nothing.

This gave me a bit of a heart attack when I first installed the extension, until I figured this out. Any way to account for this?

@yairhaimo yairhaimo added the bug label Apr 29, 2018
@yairhaimo
Copy link
Contributor

Since v2.15.0 Import Cost ignores type imports if done the following way:
import type { SomeType} from 'some-lib';

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

No branches or pull requests

2 participants