Files
qwen-code/packages/acp-bridge/tsconfig.json
T
chencheng (云谦)andShaojin Wen 29fa7bbe06 chore(types): compile cleanly under the TypeScript 7 native compiler (#16463)
* 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]>
2026-11-07 08:23:16 +00:00

31 lines
973 B
JSON

{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"lib": ["ES2023"],
"composite": true,
"types": ["node", "vitest/globals"],
"paths": {
"@qwen-code/qwen-code-core": ["../core/src/index.ts"],
"@qwen-code/qwen-code-core/subSessionConstants": [
"../core/src/tools/sub-session-constants.ts"
],
"@qwen-code/qwen-code-core/transcriptRecords": [
"../core/src/utils/transcript-records.ts"
],
"@qwen-code/qwen-code-core/telemetryConstants": [
"../core/src/telemetry/constants.ts"
],
"@qwen-code/qwen-code-core/goalWire": ["../core/src/goals/goal-wire.ts"],
"@qwen-code/qwen-code-core/noFollowOpen": [
"../core/src/utils/no-follow-open.ts"
],
"@qwen-code/qwen-code-core/*": ["../core/src/*"]
}
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "dist"],
"references": [{ "path": "../core" }]
}