Runs TypeScript type checking and filters the results to show only errors from specific files.
Install this tool using pip:
pip install tscxRun TypeScript type checking and show all errors:
tscxFilter errors for specific files:
tscx path/to/file1.ts path/to/file2.tsFilter errors for files in specific directories:
tscx src/components src/utils-p, --project PATH: Specify the TypeScript project path (default: current directory)--tsc-path PATH: Specify the path to TypeScript compiler (default: node_modules/.bin/tsc)
Note: If the TypeScript compiler is not found at the default path (
node_modules/.bin/tsc), the tool will automatically try to use the globaltsccommand.
Check a specific project:
tscx -p ./my-ts-projectUse a custom TypeScript compiler path:
tscx --tsc-path /custom/path/to/tscFilter errors for specific files in a project:
tscx -p ./my-ts-project src/components/Button.tsx src/utils/helpers.tsFilter errors for all files in specific directories:
tscx -p ./my-ts-project src/components src/utilsFor help, run:
tscx --helpYou can also use:
python -m tscx --helpTo contribute to this tool using UV, first checkout the code:
cd tscxUse UV to set up the project and install dependencies:
uv syncRun commands using UV:
# Run tests
uv run pytest
# Run the CLI tool
uv run tscx --help
# Or run via Python module
uv run python -m tscx --helpAlternatively, you can use the traditional approach:
cd tscx
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e '.[test]'To run the tests:
python -m pytest