Skip to content

Expose Checker.getTypeOfPropertyOfType on the unstable API - #64001

Open
Baptiste Jamin (baptistejamin) wants to merge 1 commit into
microsoft:mainfrom
baptistejamin:api/getTypeOfPropertyOfType
Open

Expose Checker.getTypeOfPropertyOfType on the unstable API#64001
Baptiste Jamin (baptistejamin) wants to merge 1 commit into
microsoft:mainfrom
baptistejamin:api/getTypeOfPropertyOfType

Conversation

@baptistejamin

Copy link
Copy Markdown

getTypeOfPropertyOfType already exists on the TypeScript 6 checker and internally in the Go checker (Checker.GetTypeOfPropertyOfType), but it is not wired through typescript/unstable. This PR exports it on the JS API.
It returns the type of a named property, or undefined if the property does not exist. This is the type-level counterpart of getPropertyOfType.

Test plan

  • API tests (async + sync): named property types, missing property

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI balanced review requested due to automatic review settings August 25, 2026 12:48
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Aug 25, 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

Exposes Checker.getTypeOfPropertyOfType through the unstable synchronous and asynchronous JavaScript APIs.

Changes:

  • Adds protocol dispatch and checker handling.
  • Adds sync and async API methods.
  • Tests property lookup and missing-property behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsc/internal/api/session.go Handles property-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/api.ts Exposes the synchronous method.
packages/typescript/src/api/async/api.ts Exposes the asynchronous method.
packages/typescript/test/sync/api.test.ts Tests synchronous behavior.
packages/typescript/test/async/api.test.ts Tests asynchronous behavior.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

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

Labels

None yet

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

2 participants