Skip to content

[api] Add .getReducedType() method - #63899

Open
Tom Mrazauskas (mrazauskas) wants to merge 1 commit into
microsoft:mainfrom
mrazauskas:add-getReducedType
Open

[api] Add .getReducedType() method#63899
Tom Mrazauskas (mrazauskas) wants to merge 1 commit into
microsoft:mainfrom
mrazauskas:add-getReducedType

Conversation

@mrazauskas

Copy link
Copy Markdown
Contributor

Fixes #63894

This PR adds the . getReducedType() method to the checker instance.

Signed-off-by: mrazauskas <tom@mrazauskas.de>
Copilot AI balanced review requested due to automatic review settings August 20, 2026 07:25
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Aug 20, 2026
@typescript-automation typescript-automation Bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Aug 20, 2026

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.

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.

@mrazauskas Tom Mrazauskas (mrazauskas) changed the title Add .getReducedType() method [api] Add .getReducedType() method Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

Add API to get reduced type

2 participants