【发布时间】:2021-08-03 18:18:50
【问题描述】:
我所有其他项目都可以工作,但我不知道这个 vanilla 示例与其他包含大量 npm 包的示例之间有什么不同。
进入时不会自动提示
export type THello = string;
export interface Props {
hello: string
}
const myvar: Pro // <- expect to see autosuggest happen here...
package.json
{
"name": "ts",
"version": "0.0.1",
"private": true,
"license": "ISC",
"dependencies": {
"ts-node": "^9.1.1",
"tslib": "^2.1.0",
"typescript": "^4.1.2"
},
"devDependencies": {
"typescript-tslint-plugin": "^1.0.1"
}
}
tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"module": "commonjs",
"lib": [
"es2018",
"es2015",
"es5",
"es6",
"dom",
"esnext.asynciterable"
],
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"plugins": [
{
"name": "typescript-tslint-plugin"
}
],
"outDir": "./dist/out-tsc",
"sourceMap": true,
"pretty": true,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"paths": {
"src/*": [
"src/*"
],
},
"watch": true,
"strict": true,
"allowJs": true, // problem with visual studio code import module resolutions if file does not sit inside src/
"target": "es5",
"forceConsistentCasingInFileNames": true
},
"include": [
"src/**/*"
]
}
index.ts
export type THello = string;
export interface Props {
hello: string
}
【问题讨论】:
-
这与 Emmet 无关,它是 VSCode IntelliSense。你试过用 Ctrl-Space 触发自动完成吗?
-
@iz_ 感谢您的回复。哦有趣。是的,它只是显示加载中......并且没有自动建议。
-
我不太确定你的问题可能是什么,请尝试重新启动 typescript 服务器或重新启动 vscode。
-
是的,没有改变
-
@iz_ 在下面看到我的发现。关于错误。
标签: typescript vscode-settings