[英]Type script visual studio code autocomplete
I have converted a project from javascript to TypeScript but I do not see the autocomplete suggestion / types when I hover my mouse in Visual Studio Code editor (Version 1.7.2). 我已经将项目从javascript转换为TypeScript,但是当我将鼠标悬停在Visual Studio代码编辑器(版本1.7.2)中时,看不到自动完成建议/类型。 Even the simple example below does not suggest auto complete or types of variables. 即使是下面的简单示例也不能建议自动完成或变量类型。 Do we need to make any configurations in VS Code editor for this ? 为此,我们是否需要在VS Code编辑器中进行任何配置? (or install any plugins), please suggest. (或安装任何插件),请提出建议。
class Student {
fullName: string;
constructor(public firstName, public middleInitial, public lastName) {
this.fullName = firstName + " " + middleInitial + " " + lastName;
}
}
interface Person {
firstName: string;
lastName: string;
}
function greeter(person : Person) {
return "Hello, " + person.firstName + " " + person.lastName;
}
var user = new Student("Jane", "M.", "User");
它是typecirpt sdk路径的问题-在用户设置typescript.tsdk中配置了正确的路径,现在可以使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.