tsc(1)
π NAME π
tsc β The TypeScript Compiler π
(okay so quick vibe check: this is the tsc(1) page, filed under User Commands, and yes bestie, we are absolutely in the big leagues now β¨)
β¨ COMMON COMMANDS β¨
These are the ones you'll actually type like, every single day. Slay.
tscβ compiles the current project (looks fortsconfig.jsonin the working directory). The classic. The moment. πtsc app.ts util.tsβ ignorestsconfig.jsoncompletely and compiles the files you named, with default compiler options. Just the two of you, no config, no drama.tsc -bβ builds a composite project in the working directory.tsc --initβ creates atsconfig.jsonwith the recommended settings, right there in the working directory. Your starter pack πtsc -p ./path/to/tsconfig.jsonβ compiles the TypeScript project located at the specified path.tsc --help --allβ an expanded version of this info, showing all possible compiler options. The director's cut. πΏtsc --noEmit tsc --target esnextβ compiles the current project, with additional settings. Mix and match, bestie π
π COMMAND LINE FLAGS π
--help,-hβ print this message. (hi bestie π«Ά)--watch,-wβ watch input files. Eyes. On. Them. π--allβ show all compiler options.--version,-vβ print the compiler's version.--initβ initializes a TypeScript project and creates atsconfig.jsonfile.--project,-pβ compile the project given the path to its configuration file, or to a folder with a'tsconfig.json'.--build,-bβ build one or more projects and their dependencies, if out of date.--showConfigβ print the final configuration instead of building. It's giving receipts π
πΈ COMMON COMPILER OPTIONS πΈ
okay this is the section people actually screenshot. pay attention bestie, no cap.
--prettyβ enable color and formatting in TypeScript's output to make compiler errors easier to read. type: boolean default: true--declaration,-dβ generate.d.tsfiles from TypeScript and JavaScript files in your project. type: boolean default:false, unlesscompositeis set--declarationMapβ create sourcemaps ford.tsfiles. type: boolean default: false--emitDeclarationOnlyβ only outputd.tsfiles and not JavaScript files. type: boolean default: false--sourceMapβ create source map files for emitted JavaScript files. type: boolean default: false--target,-tβ set the JavaScript language version for emitted JavaScript and include compatible library declarations. one of:es3,es5,es6/es2015,es2016,es2017,es2018,es2019,es2020,es2021,es2022,esnextdefault: es5--module,-mβ specify what module code is generated. one of:none,commonjs,amd,umd,system,es6/es2015,es2020,es2022,esnext,node16,nodenextdefault: undefined--libβ specify a set of bundled library declaration files that describe the target runtime environment. one or more:es5,es6/es2015,es7/es2016,es2017,es2018,es2019,es2020,es2021,es2022,es2023,esnext,dom,dom.iterable,webworker,webworker.importscripts,webworker.iterable,scripthost,es2015.core,es2015.collection,es2015.generator,es2015.iterable,es2015.promise,es2015.proxy,es2015.reflect,es2015.symbol,es2015.symbol.wellknown,es2016.array.include,es2017.object,es2017.sharedmemory,es2017.string,es2017.intl,es2017.typedarrays,es2018.asyncgenerator,es2018.asynciterable/esnext.asynciterable,es2018.intl,es2018.promise,es2018.regexp,es2019.array,es2019.object,es2019.string,es2019.symbol/esnext.symbol,es2019.intl,es2020.bigint/esnext.bigint,es2020.date,es2020.promise,es2020.sharedmemory,es2020.string,es2020.symbol.wellknown,es2020.intl,es2020.number,es2021.promise/esnext.promise,es2021.string,es2021.weakref/esnext.weakref,es2021.intl,es2022.array,es2022.error,es2022.intl,es2022.object,es2022.sharedmemory,es2022.string/esnext.string,es2022.regexp,es2023.array/esnext.array,esnext.intl,decorators,decorators.legacydefault: undefined--allowJsβ allow JavaScript files to be a part of your program. Use the'checkJS'option to get errors from these files. type: boolean default: false--checkJsβ enable error reporting in type-checked JavaScript files. type: boolean default: false--jsxβ specify what JSX code is generated. one of:preserve,react,react-native,react-jsx,react-jsxdevdefault: undefined--outFileβ specify a file that bundles all outputs into one JavaScript file. If'declaration'is true, also designates a file that bundles all.d.tsoutput.--outDirβ specify an output folder for all emitted files.--removeCommentsβ disable emitting comments. type: boolean default: false--noEmitβ disable emitting files from a compilation. type: boolean default: false--strictβ enable all strict type-checking options. type: boolean default: false--typesβ specify type package names to be included without being referenced in a source file.--esModuleInteropβ emit additional JavaScript to ease support for importing CommonJS modules. This enables'allowSyntheticDefaultImports'for type compatibility. type: boolean default: false
π¦ you can learn about all of the compiler options at https://aka.ms/tsc β go read it, i'll wait π
and that's a wrap, bestie!! π this was Version 5.0.4, from November 2024 β so if you're reading this from the future, hi, hope the compiler is still iconic. go forth and type your types, main character πβ¨π
π¦ where this page comes from
- ubuntu questing: node-typescript 5.0.4+ds1-2
- ubuntu resolute: node-typescript 5.2.2-2 Β· Apache-2.0
- ubuntu stonking: node-typescript 6.0.3-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms