无法让智能感知为 .ts 文件工作。
测试.js
var http = require('http');
http.[intellisense available]
Run Code Online (Sandbox Code Playgroud)
测试文件
var http = require('http');
http.[no suggestions]
Run Code Online (Sandbox Code Playgroud)
似乎没有在阅读 index.d.ts
这是tsconfig.json:
{
"compileOnSave": true,
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true,
"watch": true
}
}
Run Code Online (Sandbox Code Playgroud)
有什么建议。真的很想使用打字稿,但在学习节点时需要提示。最好不要使用 javascript。
谢谢。