TypeScript

Configure typescript project to compile all files in typescript.

Introduction#

creating your first .tsconfig configuration file which will tell the TypeScript compiler how to treat your .ts files

Typescript Configuration file setup

  • Enter command ”tsc —init” and hit enter.
  • Before that we need to compile ts file with command ”tsc app.ts” now it is all defined in below config file automatically.

List item

  • Now, You can compile all typescripts by command ”tsc”. it will automatically create “.js” file of your typescript file.

enter image description here

  • If you will create another typescript and hit “tsc” command in command prompt or terminal javascript file will be automatically created for typescript file.

Thank you,


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow