WebStorm Code Assistance For Global Variables

2019-07-08 10:53发布

I'm working with WebStorm and Parse / Parse-Sever, but having an issue where code assistance is not working the Parse functions. It tells me

require() call is missing

for the Parse variable, but since Parse is defined globally, when I add the require, it overwrites the global variable and breaks things.

Is there a way in WebStorm to enable code assistance for global variables?

1条回答
Fickle 薄情
2楼-- · 2019-07-08 11:02

When using libraries that define their own global symbols, it is recommended that you add the corresponding TypeScript type definition file as a JavaScript library in Preferences | Languages & Frameworks | JavaScript | Libraries. Click Download and search for the library you're using.

查看更多
登录 后发表回答