TypeScript Compiler
$ tsc Official Low RiskOfficial CLI for Microsoft TypeScript providing static type-checking (--noEmit), composite project builds (--build --dry), resolved JSON config inspection (--showConfig), and color-free diagnostics (--pretty false). Essential verification gate for TypeScript repositories.
npm install -g typescript Runs local TypeScript type-checking directly against workspace tsconfig.json and node_modules types.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --noEmit, --pretty false, --build --dry, --listFilesOnly, and JSON --showConfig, though type errors themselves are formatted text rather than JSON.
--noEmitand--pretty falseprovide clean non-TTY checks--showConfigoutputs JSON and--build --drypreviews builds
--noEmit and --build --dry guarantee zero file writes and zero network/credential side effects.
- Read-only verification via
--noEmit
Available everywhere Node.js runs via project devDependencies, npx, or global npm install.
- Standard npm package across macOS, Linux, and Windows
Authoritative static type-checker for TypeScript codebases, catching interface mismatches before runtime.
- Canonical type-checker matching TypeScript language semantics
First-party Microsoft compiler (microsoft/TypeScript) under Apache-2.0.
- Official
microsoft/TypeScriptrepository
Complete compiler flag handbook and --help / --all option listing.
- Official documentation at typescriptlang.org
Security, Auth & Guardrails
No credentials required; operates strictly on local .ts/.tsx source files and tsconfig.json.
Apache-2.0 open-source CLI; completely free.
# TypeScript Compiler (tsc) Agent Rules - Always run `tsc --noEmit --pretty false` (or `npx tsc --noEmit --pretty false`) to verify TypeScript edits cleanly. - Use `tsc --showConfig` to inspect inherited `tsconfig.json` settings instead of guessing compiler flags.
Agent-Ready Command Recipes
Safe Read-Only Queries
tsc --noEmit --pretty false
Runs full static type-checking in read-only mode with clean, color-free file:line:col errors.
tsc --showConfig
Outputs the final merged tsconfig.json (including extends) in JSON without compiling.
Controlled Writes & Previews
tsc --build --dry
Shows which composite sub-projects are out of date without writing .js or .tsbuildinfo files.
Strengths for Agents
- +
tsc --noEmit --pretty falseis the gold-standard read-only type-check gate for TS projects. - +
--showConfigoutputs resolvedtsconfig.jsonJSON and--build --drypreviews monorepo builds.
Caveats & Pitfalls
- ! Type error diagnostics are emitted as formatted text lines rather than a
--jsonarray. - ! Large monorepos can consume high RAM/CPU unless scoped with project references (
tsc -b).