Skip to content

[api] Checker query APIs - #65589

Merged
Andrew Branch (andrewbranch) merged 8 commits into
microsoft:mainfrom
andrewbranch:checker-query-apis
Nov 20, 2026
Merged

Andrew Branch (andrewbranch) merged 8 commits into
microsoft:mainfrom
andrewbranch:checker-query-apis

Conversation

@andrewbranch

@andrewbranch Andrew Branch (andrewbranch) commented Nov 19, 2026 •

Copy link
Copy Markdown
Member
  • Checker.getRootSymbols
  • Checker.getSymbolsOfParameterPropertyDeclaration
  • Checker.getTypeArgumentsForResolvedSignature
  • Checker.getTypeOfAssignmentPattern
  • Checker.isOptionalParameter
  • Checker.isValidPropertyAccess
  • Signature.getTypeArguments

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Valid nested rest-assignment patterns can throw, and generic union signatures can incorrectly report type arguments despite not being instantiated.

2 open issues
What changed in this PR

Extends the TypeScript JavaScript API with checker queries for symbols, assignment patterns, parameter optionality, property accessibility, and signature type arguments.

Changes:

  • Adds Go checker entry points, request handlers, and protocol definitions.
  • Exposes the queries through async, sync, and generator APIs, with cached signature type arguments.
  • Adds behavior tests and generator-batching parity coverage.
File Description
tsc/​internal/​checker/​services.go Exposes checker queries and signature type-argument resolution.
tsc/​internal/​api/​session.go Routes requests and validates query inputs.
tsc/​internal/​api/​proto.go Defines protocol methods and request/response types.
packages/​typescript/​test/​sync/​api.test.ts Adds generated synchronous query tests.
packages/​typescript/​test/​sync/​api-generators.test.ts Tests generator parity for the new APIs.
packages/​typescript/​test/​async/​api.test.ts Adds async behavior and symbol-identity tests.
packages/​typescript/​src/​api/​sync/​api.ts Adds generated sync and generator query methods.
packages/​typescript/​src/​api/​proto.generated.ts Updates generated protocol types and batch methods.
packages/​typescript/​src/​api/​async/​api.ts Adds async queries and cached signature type arguments.

Review effort: Balanced

Comment thread tsc/internal/api/session.go Resolved
Comment thread tsc/internal/checker/services.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the checker query API additions.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@andrewbranch
Andrew Branch (andrewbranch) marked this pull request as ready for review November 19, 2026 21:25
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@andrewbranch
Andrew Branch (andrewbranch) added this pull request to the merge queue Nov 20, 2026
Merged via the queue into microsoft:main with commit f5a247c Nov 20, 2026
34 checks passed
@andrewbranch
Andrew Branch (andrewbranch) deleted the checker-query-apis branch November 20, 2026 01:18
Mattia Manzati (mattiamanzati) added a commit to Effect-TS/tsgo that referenced this pull request Nov 21, 2026
…pt next

TypeScript f5a247c (microsoft/TypeScript#65589) adds
Checker.GetTypeArgumentsForResolvedSignature to checker/services.go, which
collides with the method _patches/typescript/003-checker-exports.patch added
to exports.go and broke the next-tag shim generation. The upstream method
behaves the same for every caller (all of them nil-check the signature), so
the patch is dropped for next.

The beta (3e92363) lacks the method, so its override folder keeps the patch:
`repoctl check` now lets a TypeScript patch override folder hold patches the
provider's folder dropped because the newer TypeScript carries them, as it
already does for the tsrs override folders.

Also regenerates the TypeScript next-tag sources (shims, submodule, flake)
that the failed Update Upstreams run did not commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants