Files
qwen-code/packages/cli/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

170 lines
6.5 KiB
JSON

{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"jsx": "react-jsx",
"lib": ["DOM", "DOM.Iterable", "ES2023"],
"types": ["node", "vitest/globals"],
"paths": {
"@qwen-code/qwen-code-core": ["../core/src/index.ts"],
"@qwen-code/qwen-code-core/shellResult": [
"../core/src/utils/shell-result.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/omni": ["../core/src/omni/index.ts"],
"@qwen-code/qwen-code-core/omniPolicyCollection": [
"../core/src/omni/policy/model-call-collection.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/storage": ["../core/src/config/storage.ts"],
"@qwen-code/qwen-code-core/atomicFileWrite": [
"../core/src/utils/atomicFileWrite.ts"
],
"@qwen-code/qwen-code-core/debugLogger": [
"../core/src/utils/debugLogger.ts"
],
"@qwen-code/qwen-code-core/envVarResolver": [
"../core/src/utils/envVarResolver.ts"
],
"@qwen-code/qwen-code-core/toolWriteOrigin": [
"../core/src/services/tool-write-origin.ts"
],
"@qwen-code/qwen-code-core/memoryScopes": [
"../core/src/memory/scopes.ts"
],
"@qwen-code/qwen-code-core/conversationsRuntimeMarker": [
"../core/src/utils/conversations-runtime-marker.ts"
],
"@qwen-code/qwen-code-core/subagentRuntime": [
"../core/src/subagent-runtime.ts"
],
"@qwen-code/qwen-code-core/*": ["../core/src/*"],
"@qwen-code/acp-bridge": ["../acp-bridge/src/index.ts"],
"@qwen-code/acp-bridge/transcriptReplay": [
"../acp-bridge/src/transcript-replay.ts"
],
"@qwen-code/acp-bridge/daemonMemoryBudget": [
"../acp-bridge/src/daemon-memory-budget.ts"
],
"@qwen-code/acp-bridge/*": ["../acp-bridge/src/*"],
"@qwen-code/audio-capture": ["../audio-capture/src/index.ts"],
"@qwen-code/audio-capture/*": ["../audio-capture/src/*"],
"@qwen-code/sdk": ["../sdk-typescript/src/index.ts"],
"@qwen-code/sdk/daemon/ui": ["../sdk-typescript/src/daemon/ui/index.ts"],
"@qwen-code/sdk/daemon/ui/transcript": [
"../sdk-typescript/src/daemon/ui/transcript.ts"
],
"@qwen-code/sdk/daemon/types": ["../sdk-typescript/src/daemon/types.ts"],
"@qwen-code/sdk/*": ["../sdk-typescript/src/*"]
}
},
"include": [
"index.ts",
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.json",
"scripts/**/*.ts",
"scripts/**/*.tsx",
"./package.json",
"../core/src/utils/toml-to-markdown-converter.test.ts",
"../core/src/utils/toml-to-markdown-converter.ts"
],
"exclude": [
"node_modules",
"dist",
// TODO(5691): Fix type errors and remove excludes.
"src/commands/mcp.test.ts",
"src/commands/mcp/add.test.ts",
"src/commands/mcp/list.test.ts",
"src/commands/mcp/remove.test.ts",
"src/commands/mcp/reconnect.test.ts",
"src/config/config.integration.test.ts",
"src/config/config.test.ts",
"src/config/extension.test.ts",
"src/config/settings.test.ts",
"src/nonInteractiveCli.test.ts",
"src/services/FileCommandLoader.test.ts",
"src/services/prompt-processors/argumentProcessor.test.ts",
"src/serve/auth.test.ts",
"src/serve/server.test.ts",
"src/utils/cleanup.test.ts",
"src/ui/handleAutoUpdate.test.ts",
"src/utils/startupWarnings.test.ts",
"src/ui/App.test.tsx",
"src/ui/commands/aboutCommand.test.ts",
"src/ui/commands/authCommand.test.ts",
"src/ui/commands/bugCommand.test.ts",
"src/ui/commands/clearCommand.test.ts",
"src/ui/commands/compressCommand.test.ts",
"src/ui/commands/copyCommand.test.ts",
"src/ui/commands/docsCommand.test.ts",
"src/ui/commands/editorCommand.test.ts",
"src/ui/commands/extensionsCommand.test.ts",
"src/ui/commands/helpCommand.test.ts",
"src/ui/commands/restoreCommand.test.ts",
"src/ui/commands/settingsCommand.test.ts",
"src/ui/commands/themeCommand.test.ts",
"src/ui/commands/chatCommand.test.ts",
"src/ui/commands/directoryCommand.test.tsx",
"src/ui/commands/ideCommand.test.ts",
"src/ui/commands/initCommand.test.ts",
"src/ui/commands/quitCommand.test.ts",
"src/ui/commands/mcpCommand.test.ts",
"src/ui/commands/memoryCommand.test.ts",
"src/ui/commands/statsCommand.test.ts",
"src/ui/commands/terminalSetupCommand.test.ts",
"src/ui/commands/toolsCommand.test.ts",
"src/ui/components/ContextSummaryDisplay.test.tsx",
"src/ui/components/Footer.test.tsx",
"src/ui/components/InputPrompt.test.tsx",
"src/ui/components/ModelStatsDisplay.test.tsx",
"src/ui/components/SessionSummaryDisplay.test.tsx",
"src/ui/components/shared/text-buffer.test.ts",
"src/ui/components/shared/vim-buffer-actions.test.ts",
"src/ui/components/StatsDisplay.test.tsx",
"src/ui/components/ToolStatsDisplay.test.tsx",
"src/ui/components/WarningMessage.test.tsx",
"src/ui/contexts/SessionContext.test.tsx",
"src/ui/hooks/slashCommandProcessor.test.ts",
"src/ui/hooks/useAtCompletion.test.ts",
"src/ui/hooks/useConsoleMessages.test.ts",
"src/ui/hooks/useCommandCompletion.test.ts",
"src/ui/hooks/useFocus.test.ts",
"src/ui/hooks/useFolderTrust.test.ts",
"src/ui/hooks/use-llm-stream.test.tsx",
"src/ui/hooks/useKeypress.test.ts",
"src/ui/hooks/usePhraseCycler.test.ts",
"src/ui/utils/computeStats.test.ts",
"src/ui/themes/theme.test.ts",
"src/validateNonInterActiveAuth.test.ts",
"src/services/prompt-processors/shellProcessor.test.ts",
"src/commands/extensions/examples/**"
],
"references": [
{ "path": "../core" },
{ "path": "../acp-bridge" },
{ "path": "../audio-capture" },
{ "path": "../sdk-typescript/tsconfig.reference.json" },
{ "path": "../channels/base" },
{ "path": "../channels/telegram" },
{ "path": "../channels/weixin" },
{ "path": "../channels/dingtalk" },
{ "path": "../channels/dws" },
{ "path": "../channels/email" },
{ "path": "../channels/wecom" },
{ "path": "../channels/feishu" },
{ "path": "../channels/gitlab" }
]
}