mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-11-07 06:19:43 -10:00
* fix(types): compile cleanly under the TypeScript 7 native compiler tsgo (@typescript/native-preview) reported 48 errors across the typecheck projects while tsc 5.8 reported none. This removes all of them without changing what tsc emits, so a tsgo typecheck lane or a later compiler switch can start from a clean tree. - Drop `baseUrl` from five tsconfigs. TypeScript 7 removed it, and every `paths` target here is already relative to its tsconfig. - Set `rootDir` where TypeScript 7 no longer infers it (web-shell declarations, sdk-typescript), and list node types explicitly for cua-driver now that @types are no longer included by default. - Annotate Buffers built by Node's Buffer factories as `Buffer<ArrayBuffer>` (or widen to `Buffer` where a variable later receives stream chunks); the ES2024 lib no longer treats ArrayBufferLike as an ArrayBuffer, so these failed at fetch, Blob, and Response call sites. The two call sites that take caller- or interface-supplied bytes assert `BodyInit`, matching the existing XMLHttpRequest upload path. - Remove three redundant `?? []` / `?? undefined` operands that the newer checker reports as unreachable. - Declare `*.css` modules for the two integrations that import stylesheets, now that side-effect imports are checked. * fix(types): include web-shell client declarations in the build config The config's include listed only client/index.tsx, so client/vite-env.d.ts and client/local-files/file-system-access.d.ts never entered the program. Removing baseUrl unmasked 227 tsgo errors (and 222 under tsc 5.8) for the CSS module and File System Access declarations they provide. --------- Co-authored-by: Shaojin Wen <[email protected]>
24 lines
899 B
JSON
24 lines
899 B
JSON
{
|
|
"extends": "./tsconfig.json",
|
|
"compilerOptions": {
|
|
"outDir": "./dist",
|
|
"rootDir": "./src",
|
|
"module": "ESNext",
|
|
"moduleResolution": "bundler",
|
|
"declaration": true,
|
|
"declarationMap": false,
|
|
"sourceMap": false,
|
|
"emitDeclarationOnly": true,
|
|
"removeComments": false,
|
|
// Reset the paths inherited from tsconfig.json: they map core subpaths to
|
|
// core sources for the cli bundle's esbuild discovery, but in this plain
|
|
// declaration build they would pull those sources into the program,
|
|
// re-root the inferred rootDir above this package, and nest every emitted
|
|
// .d.ts under dist/sdk-typescript/src/ (dropping dist/daemon/index.d.ts).
|
|
// Resolving core through its exports map keeps the dist layout stable.
|
|
"paths": {}
|
|
},
|
|
"include": ["src/**/*.ts"],
|
|
"exclude": ["node_modules", "dist", "test", "**/*.test.ts", "**/*.spec.ts"]
|
|
}
|