Skip to content

chore: upgrade TypeScript to 7.0.2#11267

Draft
timotheeguerin with Copilot wants to merge 2 commits into
mainfrom
copilot/upgrade-to-typescript-7-0-2
Draft

chore: upgrade TypeScript to 7.0.2#11267
timotheeguerin with Copilot wants to merge 2 commits into
mainfrom
copilot/upgrade-to-typescript-7-0-2

Conversation

Copilot AI commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

TypeScript 7 drops the JavaScript Compiler API from the main typescript package — ts.sys, ts.createProgram, ts.SyntaxKind, etc. are gone. Tools still needing it must use the @typescript/typescript6 compatibility package.

Version changes

  • typescript catalog: ~6.0.2~7.0.2
  • http-client-python, http-client-csharp: updated independently (excluded from workspace)
  • vite-plugin-dts: 5.0.25.0.3 (first version with TS7 support)

TypeScript Compiler API compatibility

Added @typescript/typescript6: ~6.0.2 to the catalog. Packages using vite-plugin-dts (html-program-viewer, playground, playground-website, react-components, spec-dashboard) now declare it as a devDep.

Type error fixes (TS7 stricter inference)

TS7's bidirectional inference now narrows R to false instead of boolean in onRequest overloads:

  • compiler/src/server/server.ts: connection.onRequest<boolean, unknown>(...)
  • typespec-vscode/src/tsp-language-client.ts: lc.onRequest<string | undefined, unknown>(...)

pnpm patches for third-party packages using the Compiler API

Package What was patched
@alloy-js/cli@0.24.0 typescript@typescript/typescript6 in build.js / typescript.js
typedoc@0.28.19 All from "typescript"from "@typescript/typescript6" (25+ files)
@astrojs/check@0.9.9 require.resolve('typescript')require.resolve('@typescript/typescript6')
@astrojs/language-server@2.16.10 require('typescript')require('@typescript/typescript6') in check.js

Each patched package also gets @typescript/typescript6 injected via packageExtensions in pnpm-workspace.yaml.

Copilot AI and others added 2 commits July 15, 2026 16:48
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added compiler:core Issues for @typespec/compiler ide Issues for VS, VSCode, Monaco, etc. emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp emitter:client:python Issue for the Python client emitter: @typespec/http-client-python ui:playground ui:type-graph-viewer labels Jul 15, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp emitter:client:python Issue for the Python client emitter: @typespec/http-client-python ide Issues for VS, VSCode, Monaco, etc. ui:playground ui:type-graph-viewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants