Skip to content

Command line ​

sh
tsox --project path/to/tsconfig.json

It reads the config, checks the files its include, exclude and files select, and resolves imports with paths, baseUrl, extends and references. Diagnostics go to standard output; the exit code is non-zero when there are errors.

OptionMeaning
--project <path>The tsconfig.json to use.
--flatCheck each file on its own, without the module graph.
--incremental, --watchKeep the project in memory and re-check on change.
--tsc-codesLabel diagnostics with the TSxxxx code tsc uses.
--version, -VPrint the version.

Run tsox --help for the full list.

Reporting what tsox does not check ​

When tsox meets something it does not check yet, it prints a TSR9xxx warning and carries on. These flags turn those warnings into a report:

FlagWhat it does
--report[=FILE]Writes FILE (default tsox-report.md) with every such place, with file names and lines. Stays on your machine.
--report-issuePrints, and opens, a link to a prefilled GitHub issue in tsoxide/tsox. Nothing is sent until you press submit on GitHub.
--report-submitShows the exact issue text, asks y/N (or pass --yes), then posts it with the GitHub CLI (gh). Falls back to the link.
--report-namesKeep quoted names in the issue text (by default 'Foo' becomes '_').
--no-openPrint the link but do not open a browser.

The issue text holds codes, counts, messages, the tsox version and the OS. It never holds paths, line numbers or source code. Set TSOX_REPORT_REPO to send it to a fork instead.

MIT OR Apache-2.0