diff --git a/package.json b/package.json index f868824..b4a9073 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "scripts": { "build": "tsc", "test": "vitest run", - "typecheck": "tsc --noEmit" + "typecheck": "tsc --noEmit && tsc -p tsconfig.test.json" }, "devDependencies": { "@types/node": "^22.0.0", diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 0000000..2b538dd --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,13 @@ +{ + // Type-check the test files too. The base tsconfig.json excludes + // **/*.test.ts so `build` (tsc emit) never writes test declarations into + // dist/; this config re-includes them under --noEmit so `typecheck` actually + // verifies the contract test — the repo's whole deliverable. + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": true, + "declaration": false + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +}