Skip to content

Expose getFullyQualifiedName on the API Checker#4700

Open
WinterYukky wants to merge 1 commit into
microsoft:mainfrom
WinterYukky:feat/api-get-fully-qualified-name-1784628958
Open

Expose getFullyQualifiedName on the API Checker#4700
WinterYukky wants to merge 1 commit into
microsoft:mainfrom
WinterYukky:feat/api-get-fully-qualified-name-1784628958

Conversation

@WinterYukky

Copy link
Copy Markdown

Summary

This adds checker.getFullyQualifiedName(symbol) to the unstable API, for parity with the classic public TypeChecker.getFullyQualifiedName.

Why we need this change?

Tools that build on the Compiler API rely on this method for symbol identification. For example, jsii — the multi-language binding generator behind the AWS CDK, one of the largest TypeScript codebases — calls it ~357k times when compiling aws-cdk-lib, its single most-called checker API, — and it is currently the only checker API in jsii's extraction hot path with no equivalent here.

Notes

Implementation

The checker already had the internal getFullyQualifiedName; this change only wires it up following the existing CheckerSymbolParams pattern (Go handler + async client method; the sync client and tests are generated via generateSync).

Tests

Added sync/async client tests covering module-qualified names ("/src/index".Standalone) and nested members ("/src/index".Outer.Inner). go test ./internal/api/... and the native-preview client test suites pass (196/196 each).

Copilot AI review requested due to automatic review settings July 22, 2026 01:56

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 getFullyQualifiedName through the checker API for parity with TypeScript’s classic TypeChecker.

Changes:

  • Adds the exported Go checker method and API protocol handler.
  • Adds synchronous and asynchronous client methods.
  • Tests module-qualified and nested symbol names.

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
internal/checker/exports.go Exposes the checker implementation.
internal/api/session.go Handles API requests.
internal/api/proto.go Registers the protocol method.
_packages/native-preview/src/api/sync/api.ts Adds the synchronous client API.
_packages/native-preview/src/api/async/api.ts Adds the asynchronous client API.
_packages/native-preview/test/sync/api.test.ts Tests synchronous behavior.
_packages/native-preview/test/async/api.test.ts Tests asynchronous behavior.

@WinterYukky

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants