I've updated to WebStorm 11 and suddenly I don't have the Node Globalslibrary definitions any more ( I think it was called Node Globals )?
As such I get squiggly lines for core Node objects like JSON
:
I've just added the node-DefinitelyTyped
library, that's got rud of the squiggles under JSON
but now t says that stringify()
is not a function:
不再有Node Globals
库,它已与Node Core库合并,可以在Settings/Languages & frameworks/Node.js and NPM
对其进行配置和启用
JSON is not a nodejs thing, so don't include the node.d.ts, it is part of JavaScript, and TypeScript holds all the language definitions in a file called lib.d.ts or lib.es6.d.ts (In case you are outputting into ES6).
Your problem should not happen at all, unless you "told" WebStorm to use a specific version of TypeScript that was configured to ignore the lib.d.ts (And this can be done! by adding --noLib
to the compiler)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.