Super newbie question about 'universal' modules

Hi,

I'm a new webstorm customer/js developer working on a chrome v3 extension.

The project uses a module called 'psl.min.js' which works fine at runtime, but webstorm can't see any of it's symbols. Is there a way to fix this?

I tried importing it using a plain old import statement, but apparently the module is in a special 'universal'  format which means it cannot be used like this. Surely this must mean the module is merely 'galactic' then?!?

Is there any way to get webstorm to recognize the module? As far as using it in a chrome extension goes, the module just has to appear in the manifest file and it all works. Is there something similar for webstorm?

Bye!
Mark

 

0
2 comments

The IDE can't provide any completion from the minified (compressed + obfuscated) files. You need adding a debug, non-minified version of your library to the project or, even better, add typings (.d.ts files) describing the library types

 

See https://blog.jetbrains.com/webstorm/2014/07/how-webstorm-works-completion-for-javascript-libraries/ for more info

0

Thanks for that! Turned out there was a 'psl' 'type library' available for download in webstorm which is working fine so all sorted.

 

1

Please sign in to leave a comment.