Search code examples
typescriptphpstormwebstormintellisense

PhpStorm autocomplete not working for TypeScript classes in node_modules


I am working on TypeScript Standard Library and I want to distribute it as NPM package as is. It means that package will only contain .ts files, without .d.ts and .js.

PhpStorm does not see such package. Usually it suggest to import classes / interfaces, but for classes defined in .ts files located in node_modules it doesn't.

I've tried all possible configuration options, but no success.


Solution

  • Right now it isn't possible to configure PhpStorm / WebStorm to add the imports automatically without ".d.ts" files. See the issue https://youtrack.jetbrains.com/issue/WEB-24868

    Update: In 2017.2.3 you can specify the package in 'include' section and WebStorm will autoimport '.ts' symbols from the packages