Intellij IDEA:如何为节点应用程序启用 TypeScript 开发?
Intellij IDEA: How to enable TypeScript development for node apps?
我已经阅读了尽可能多的信息,但我仍然得到 error TS2304: Cannot find name 'require'.
我还需要做些什么才能使用 TypeScript 在 IDEA 中为 node.js 开发?
What else do I have to do to be able to develop for node.js in IDEA with TypeScript
您添加的参考 仅对为您提供 JavaScript 个项目 的类型信息有效。对于 TypeScript,您需要在您的项目中显式 node.d.ts
并正确地 /// <reference
ed。
你可以从 TSD node.d.ts
https://github.com/DefinitelyTyped/tsd tsd install node
我已经阅读了尽可能多的信息,但我仍然得到 error TS2304: Cannot find name 'require'.
我还需要做些什么才能使用 TypeScript 在 IDEA 中为 node.js 开发?
What else do I have to do to be able to develop for node.js in IDEA with TypeScript
您添加的参考 仅对为您提供 JavaScript 个项目 的类型信息有效。对于 TypeScript,您需要在您的项目中显式 node.d.ts
并正确地 /// <reference
ed。
你可以从 TSD node.d.ts
https://github.com/DefinitelyTyped/tsd tsd install node