Reputation: 7375
I am working on typescript project.we have to generate the javascript file automatically by saving the ts file without any tsconfig.json.
exmaple test.ts file here
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. it is creating the javascript files for associated .ts file.
but without using any .json setup, can we generate the .js file automatically by saving .ts file in vs2017.
what are all the settings we have to configure to make it done in vs2017.
Upvotes: 0
Views: 248
Reputation: 1993
If you are not using a tsconfig.json file, then the project property pages should would be the place to set CompileOnSave.
Upvotes: 1