CLI and tsconfig
The CLI intentionally resembles the useful subset of tsc so the experiment can be measured against familiar workflows without pretending every TypeScript option is implemented.
Core commands
tscc file.ts
tscc file.ts --outDir dist
tscc -p tsconfig.json
tscc --project tsconfig.json
tscc --noEmit file.ts
tscc --noEmitOnError --outDir dist good.ts bad.ts
tscc --noResolve file.ts
Output/project options
--rootDir defines the source-relative output layout. --outDir chooses the destination. Project mode preserves nested directories rather than flattening module graphs.
Module mode
tscc --module esnext src/main.ts
tscc --module preserve src/main.ts
tscc --module commonjs src/main.ts
Preserve/esnext retain runtime ESM syntax. CommonJS performs tscc's current CJS transform, including imports, exports, re-exports, default forms, import = require() and export =.
JSX mode
tscc --jsx preserve src/App.tsx
Preserve is currently the supported JSX mode. tscc does not yet lower JSX to React.createElement or an automatic runtime.
tsconfig subset
Current project configuration supports practical fields such as rootDir, outDir, target, module, jsx, removeComments, noEmit, noEmitOnError, files, include and exclude. JSONC comments and trailing commas are accepted.
Unknown options
Unsupported CLI options fail rather than silently pretending to implement TypeScript behavior. That is an intentional compatibility rule: explicit incompleteness is safer than a green command that ignored a meaningful compiler setting.
Diagnostic contract
TCP1 assigns stable TSCC codes and deterministic ordering. CLI contract errors use TSCC0001-TSCC0003, ordinary compiler errors currently use TSCC1000, and warnings use TSCC2000. Non-pretty output retains file, line, column, source excerpt and caret without ANSI escapes. Missing option values fail explicitly with status 2.
Current output policy
Each source is prepared with file-local diagnostics before output policy is applied. Default mode writes every successfully prepared file and still returns failure when another input is invalid. --noEmitOnError (or the matching tsconfig option) writes none when any input fails; --noEmit always writes none. Individual outputs are staged beside their destinations before rename, but the multi-file rename sequence is not a filesystem transaction.
TCP2 preview boundary
The compiler preview target is exactly es2022. Supported module labels are preserve, esnext and commonjs; JSX is preserve-only. Project roots are sorted before compilation, repeat builds must be byte-identical, and unknown compilerOptions fail with TSCC3001 instead of being ignored.
Compatibility is deliberate, not cosmetic
A familiar flag name does not imply the full tsc behavior behind it. TSCC now has bounded package/Node-style resolution, selected path/config mapping, declaration and source-map emit, and an incremental-output foundation, but those names still represent only the documented TSCC subset; watch mode, semantic incremental reuse, project references and much of the wider TypeScript option surface remain incomplete.