[英]Typescript file auto create Javascript in vs2017 without tsconfig.json globally project level
I am working on typescript project.we have to generate the javascript file automatically by saving the ts file without any tsconfig.json.我正在打字稿项目。我们必须通过保存没有任何 tsconfig.json 的 ts 文件来自动生成 javascript 文件。
exmaple test.ts file here示例 test.ts文件在这里
interface Person {
firstName: string;
lastName: string;
}
function greeter(person: Person) {
return "Hello, " + person.firstName + " " + person.lastName;
}
let user = { firstName: "Jane", lastName: "User" };
document.body.textContent = greeter(user);
we can use tsconfig.json to generate the javascript file, it is working fine.我们可以使用 tsconfig.json 来生成 javascript 文件,它工作正常。 it is creating the javascript files for associated .ts file.
它正在为关联的 .ts 文件创建 javascript 文件。
but without using any .json setup, can we generate the .js file automatically by saving .ts file in vs2017.但是不使用任何 .json 设置,我们可以通过在 vs2017 中保存 .ts 文件来自动生成 .js 文件吗?
what are all the settings we have to configure to make it done in vs2017.我们必须配置哪些设置才能在 vs2017 中完成。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.