tsc-mixed
📠 ️Run tsc
with a configuration and files.
Introduction
tsc-mixed
builds upon TypeScript's own tsc
to circumvent its TS5042
error.
tsc --project tsconfig.json index.ts
# error TS5042: Option "project" cannot be mixed with source files on a command line.
Installation
Yarn
yarn add -D tsc-mixed
npm
npm install --save-dev tsc-mixed
Usage
Use it as a drop-in tsc
replacement.
tsc-mixed --project tsconfig.json index.ts
lint-staged
Use it with lint-staged
to only type check staged files.
{
"**/*.{ts,tsx}": ["tsc-mixed --project tsconfig.json"]
}