Creating a TypeScript configuration file quickly with "tsc --init"
Posted: (EET/GMT+2)
If you are getting started with a new TypeScript application, and you want to quickly create a "tsconfig.json" file, you can of course fire up your favorite text editor, and start typing.
However, there's an even better way to do this: the TypeScript compiler, or "tsc", can help you in creating the configuration file, with suitable default values set. To do this, simply open your command prompt (such as, the Visual Studio Developer Command Prompt), and then navigate to your project's folder.
Next, type in the following simple command:
tsc --init
This causes the file "tsconfig.json" to be automatically created. Then, you can start tweaking the settings to match your needs.
Happy scripting!