From c916836015a31d8f488b6bf0e44ed9a9ef0cb99f Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Sun, 7 Jul 2019 14:25:20 +0100 Subject: [PATCH] tsc: add page (#3173) --- pages/common/tsc.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/common/tsc.md diff --git a/pages/common/tsc.md b/pages/common/tsc.md new file mode 100644 index 0000000000..b8a855f116 --- /dev/null +++ b/pages/common/tsc.md @@ -0,0 +1,28 @@ +# tsc + +> TypeScript compiler. +> More information: . + +- Compile a TypeScript file `foobar.ts` into a JavaScript file `foobar.js`: + +`tsc {{foobar.ts}}` + +- Compile a TypeScript file into JavaScript using a specific target syntax (default is `ES3`): + +`tsc --target {{ES5|ES2015|ES2016|ES2017|ES2018|ESNEXT}} {{foobar.ts}}` + +- Compile a TypeScript file into a JavaScript file with a custom name: + +`tsc --outFile {{output.js}} {{input.ts}}` + +- Compile all `.ts` files of a TypeScript project defined in a `tsconfig.json` file: + +`tsc --build {{tsconfig.json}}` + +- Run the compiler using command line options and arguments fetched from a text file: + +`tsc @{{args.txt}}` + +- Type-check multiple JavaScript files, and output only the errors: + +`tsc --allowJs --checkJs --noEmit {{src/**/*.js}}`