Is there a way to print the options used by tsc
? I feel like it doesn't take my tsconfig.json
into account and I'm looking for a flag that would allow me to know what kind of options it's trying to use.
The TypeScript compiler, named tsc , is written in TypeScript. As a result, it can be compiled into regular JavaScript and can then be executed in any JavaScript engine (e.g. a browser).
Typescript does transpile into Javascript. In your tsconfig configuration file, you can specify which is the target language you want it transpiled to. That means you can already work with cutting edge ECMAScript features out of the box.
TypeScript is available as a package on the npm registry available as "typescript" . You will need a copy of Node. js as an environment to run the package. Then you use a dependency manager like npm, yarn or pnpm to download TypeScript into your project.
Tsc stands for `TypeScript compiler` and is a simple tool included in Typescript itself, allowing you to compile any ts files into js.
tsc --showConfig
will show the complete config that will be used for compilation.
The --showConfig
flag has been added in typescript 3.2:
TypeScript will calculate the effective tsconfig.json (after calculating options inherited from the extends field) and print that out. This can be useful for diagnosing configuration issues in general.
Description from the compiler options documentation:
Rather than actually execute a build with the other input options and config files, show the final implied config file in the output.
Currently there is no option to dump the loaded configuration.
You may want to upvote the issue:
Edit: tsc --showConfig
has been implemented as of v3.2.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With