Google News
logo
TypeScript - Interview Questions
How do you compile TypeScript files?
The extension for any TypeScript file is .ts. And any JavaScript file is a TypeScript file as it is a superset of JavaScript. So, once you change the extension of “.js” to “.ts”, your TypeScript file is ready. To compile any .ts file into .js use the following command :
 
tsc <TypeScript File Name>
 
For example, to compile “freetimelearn.ts
 
tsc freetimelearn.ts
 
And the result would be freetimelearn.js
Advertisement