tsc
compile
in TS?Compiling in Typescript is direct translation of .ts
files to .js
files.
tsc
processes each file independently and generates corresponding .js
files for each.
build
in TS?TypeScript compiler can orchestrate the compilation of an entire project, including handling dependencies between files and projects.
tsc
Compile typescript locally on a project using Typescript Compiler (tsc
).
Running tsc
locally will compile the closest project
defined by a tsconfig.json
:
# Compile entire project (actually builds it) tsc -b # Compile specific file tsc -b path/index.ts # do not emit compiler output files tsc --noEmit # all `.ts` files in given path tsc src/*.ts # clean builds tsc -b --clean
tsc
Running tsc
on a given path will still check the adjacent/neighboring types that are used in the current context.
If you want to truly isolate the tsc
run to a specified scope, check nx affected
.
Interface Definition Language