Files
actual/packages/api/tsconfig.json
github-actions[bot] 0c5fc1b38c [AI] api: typecheck no longer clobbers Vite build output
tsgo -b (used by both project-reference builds and the typecheck
script) emits .js per source file into outDir. Since the api's outDir
is dist/ and tsconfig had noEmit: false + declaration: true, every
`yarn typecheck` overwrote the Vite-built browser.js / worker.js with
per-file TS compilations, breaking downstream consumers until the next
Vite rebuild.

Adding emitDeclarationOnly: true to tsconfig keeps the composite /
declaration wiring intact (required for project references) but
suppresses JS emission. build:node still passes --emitDeclarationOnly
on the CLI so the intent is explicit there too.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 16:19:53 +01:00

37 lines
1.1 KiB
JSON

{
"extends": "../../tsconfig.json",
"compilerOptions": {
"composite": true,
// Using ES2021 because that's the newest version where
// the latest Node 16.x release supports all of the features
"target": "ES2021",
"module": "es2022",
"moduleResolution": "bundler",
"customConditions": ["api"],
// composite + declaration: true require `noEmit: false`, so use
// emitDeclarationOnly to keep typecheck + project refs working without
// clobbering the Vite build artifacts in dist/. build:node also passes
// --emitDeclarationOnly on the CLI (redundant but explicit).
"noEmit": false,
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true,
"outDir": "dist",
"rootDir": ".",
"declarationDir": "@types",
"tsBuildInfoFile": "dist/.tsbuildinfo",
"plugins": [{ "name": "typescript-strict-plugin", "paths": ["."] }]
},
"references": [{ "path": "../crdt" }, { "path": "../loot-core" }],
"include": ["."],
"exclude": [
"**/node_modules/*",
"dist",
"@types",
"**/*.test.ts",
"test/setup.*.ts",
"*.config.ts",
"*.config.mts"
]
}