I just bought WebStorm 5 and so far have been really enjoying its Inspection features. One hitch I've run in to when developing my Chrome extension is that it doesn't recognize the chrome
variable:
Is there a way I can add the chrome
variable to the Inspector so that it can autocomplete as I type? I'm guessing I would need to add Chromium as an External Library but I'm unsure where to start.
Open the Settings
dialog (File
> Settings
)
Click Languages & Frameworks
> Javascript
> Libraries
Click Download
Make sure TypeScript community stubs
is selected
Select chrome
from the list (you can find it quickly by just typing chrome
)
Click Download and Install
Click OK
to close the Settings dialog.
Steps 2-6 illustrated below:
In any subsequent project, you just:
Open the Settings
dialog again (File
> Settings
)
Click Languages & Frameworks
> Javascript
> Libraries
again
Check chrome-DefinitelyTyped
Click OK
to close the dialog.
Steps 2-4 shown below: