soates / Auto-Import

vscode extension that will automatically finds, parses and provides code actions for all available imports. Only currently works with files in your folder and TypeScript.
MIT License
165 stars 62 forks source link

auto-import and generated d.ts files #1

Open KnisterPeter opened 8 years ago

KnisterPeter commented 8 years ago

Regarding my comment from the marketplace:

Would be awesome but if you let tsc generate typing files then the auto-import stuggles and writes the typing files as import statements. It would be good to configure this plugin with a glob expression to allowed paths to scan.

If your tsconfig.json file contains the compiler option to generate definition files for your code ("definitions": true), then auto-import will struggle to find the correct type import. In my tests it imports the from the generated d.ts files which is clearly not what one expects (and it will fail if you clean all generated code for a full rebuild.

I think it would be great to exclude paths from auto-import (e.g. build artifact folders).

soates commented 8 years ago

Ill have a look at this,

as for your last comment - I have added a new configuration folder that takes a GLOB for files to include, hope that helps.