[@typescript/api] Add a few more checker APIs#2972
Merged
andrewbranch merged 6 commits intomicrosoft:mainfrom Mar 4, 2026
Merged
[@typescript/api] Add a few more checker APIs#2972andrewbranch merged 6 commits intomicrosoft:mainfrom
andrewbranch merged 6 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds several additional TypeScript checker APIs to the @typescript/api surface by wiring new RPC methods through the Go API server and exposing them via the sync/async TypeScript client wrappers (with accompanying tests and enum generation).
Changes:
- Add new checker RPC endpoints (e.g.
isContextSensitive, signature/type queries) and snapshot signature-handle resolution on the Go server. - Expose new APIs and types in the TypeScript sync/async clients (including
TypePredicate/IndexInfo) and generateTypePredicateKind. - Add sync + async API tests covering the new checker endpoints.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/checker/types.go | Adds exported getters for TypePredicate and IndexInfo to support API serialization. |
| internal/checker/exports.go | Exposes additional checker methods via exported wrappers used by the API server. |
| internal/api/session.go | Adds signature-handle resolution and implements new checker request handlers + dispatch entries. |
| internal/api/proto.go | Adds new method IDs, request param types, and response shapes for new checker RPCs. |
| _packages/api/src/sync/types.ts | Adds TypePredicate and IndexInfo public type definitions for sync client. |
| _packages/api/src/async/types.ts | Adds TypePredicate and IndexInfo public type definitions for async client. |
| _packages/api/src/sync/api.ts | Adds new Checker methods and exports TypePredicateKind + related types (sync). |
| _packages/api/src/async/api.ts | Adds new Checker methods and exports TypePredicateKind + related types (async). |
| _packages/api/src/proto.ts | Adds TS-side protocol response typings for TypePredicateResponse and IndexInfoResponse. |
| _packages/api/src/enums/typePredicateKind.ts | Adds generated runtime enum for TypePredicateKind. |
| _packages/api/src/enums/typePredicateKind.enum.ts | Adds generated TypeScript enum TypePredicateKind. |
| _packages/api/test/sync/api.test.ts | Adds sync tests covering newly added checker APIs. |
| _packages/api/test/async/api.test.ts | Adds async tests covering newly added checker APIs. |
| Herebyfile.mjs | Hooks TypePredicateKind into enum generation pipeline. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jakebailey
reviewed
Mar 4, 2026
…ndex is always present
jakebailey
approved these changes
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
isContextSensitivegetReturnTypeOfSignaturegetRestTypeOfSignaturegetTypePredicateOfSignaturegetBaseTypesgetPropertiesOfTypegetIndexInfosOfTypegetConstraintOfTypeParametergetTypeArguments