[api] Add .getReducedType() method - #63899
Open
Tom Mrazauskas (mrazauskas) wants to merge 1 commit into
Open
Conversation
Signed-off-by: mrazauskas <tom@mrazauskas.de>
Copilot started reviewing on behalf of
Tom Mrazauskas (mrazauskas)
August 20, 2026 07:26
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds public reduced-type access across the compiler backend and synchronous/asynchronous TypeScript APIs.
Changes:
- Exposes the checker’s existing type-reduction algorithm.
- Adds protocol routing and cached API wrappers.
- Tests reduction through both API modes.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tsc/internal/checker/exports.go |
Exposes GetReducedType. |
tsc/internal/api/session.go |
Handles reduced-type requests. |
tsc/internal/api/proto.go |
Registers the protocol method. |
packages/typescript/src/api/proto.generated.ts |
Adds generated protocol typing. |
packages/typescript/src/api/sync/types.ts |
Declares the synchronous type method. |
packages/typescript/src/api/sync/api.ts |
Implements synchronous access and caching. |
packages/typescript/src/api/async/types.ts |
Declares the asynchronous type method. |
packages/typescript/src/api/async/api.ts |
Implements asynchronous access and caching. |
packages/typescript/test/sync/api.test.ts |
Tests synchronous reduction. |
packages/typescript/test/async/api.test.ts |
Tests asynchronous reduction. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
.getReducedType() method.getReducedType() method
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.
Fixes #63894
This PR adds the
. getReducedType()method to the checker instance.