Static Code Analysis
Type-check TypeScript without emitting files
tsc-check is an offline TypeScript type-checking node that returns JSON diagnostics.
overview
What tsc-check does
Check a copied TypeScript project and return file, line, column, TS code and diagnostic message.
A root tsconfig.json is used when supplied. Otherwise .ts, .tsx, .mts and .cts source files use strict defaults, ES2022 target, ESNext modules and bundler resolution. The compiler emits no JavaScript and runs no project code.
Only built-in library types are available. node_modules is refused; third-party imports can produce TS2307. Limits are 50 MiB, 5000 entries and 300 seconds. Diagnostic findings, including malformed configuration, are successful JSON output; compiler crashes fail the job.
This packaged operation uses the native TypeScript 7.0.2 compiler. The linked typescript-go source revision matches the installed npm packages. Upstream license: Apache-2.0.
source github.com/microsoft/typescript-go/tree/2bd066d87f5bafd315be9f40889d0a60b9e58e0b
use cases
Where tsc-check fits
Check source type errors
Find incompatible return values and argument types before compiling a snippet.
Apply a supplied tsconfig
Use root tsconfig.json instead of the built-in strict defaults.
Keep diagnostic locations
Receive TS codes and source positions in a JSON report.
reference
tsc-check inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| source | FOLDER | --source | Folder of TypeScript source, optionally with tsconfig.json at its root; no node_modules (built-in lib types only); maximum 50 MiB, 5000 entries. |
Showing key inputs. tsc-check exposes 1 inputs in total.
example
Run tsc-check
node /app/run.mjs --source ./source ./outputguidance
Choosing tsc-check
Use tsc-check for type errors. Lint rules and runtime test assertions answer different questions; this node does not install a project dependency tree.
faq
tsc-check questions
related
More Static Code Analysis tools
bandit
Python source in, JSON security findings out.
gitleaks
Detect hardcoded secrets in git repos and plain directories.
gosec
Go AST security scanner for credentials, crypto, and injection.
guarddog
A package coordinate in, indicator hits out.
malcontent-scan
A package coordinate in, behavior findings out.
osv-malicious
A package coordinate in, malware advisory rows out.
Run tsc-check yourself
The saved synthetic check found TS2322 at label.ts line 2 and TS2345 at line 4. These are verifier-confirmed locations, not a retained complete diagnostics JSON. The command shows the container entrypoint with example paths.
Facts on this page come from the live Trickest tool library.