Typescript需要知道它
http存在。更新
为节点安装类型definitinos:
旧答案npm install @types/node
遵循这两个步骤
node.d.ts
从此处下载文件:https : //github.com/borisyankov/DefinitelyTyped/tree/master/node- 在文件顶部添加:
/// <reference path="node.d.ts" />
PS:请参阅示例测试文件:https : //github.com/borisyankov/DefinitelyTyped/blob/master/node/node-
tests.ts
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)