Skip to content

Restore behavior of getImmediateAliasedSymbol - #64867

Open
Andrew Branch (andrewbranch) wants to merge 1 commit into
microsoft:mainfrom
andrewbranch:type-predicate-regression
Open

Andrew Branch (andrewbranch) wants to merge 1 commit into
microsoft:mainfrom
andrewbranch:type-predicate-regression

Conversation

@andrewbranch

Copy link
Copy Markdown
Member

Fixes #64532

It looks like microsoft/typescript-go#2168 removed something that was unneeded internally, but necessary to preserve TS 6 API semantics.

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.

🟢 Approval recommended

The focused change preserves full-resolution callers and adds targeted regression coverage, with no unresolved findings.

No open issues 🎉

What changed in this PR

Restores getImmediateAliasedSymbol compatibility with TypeScript 6, addressing #64532.

Changes:

  • Preserves immediate namespace alias targets without recursive resolution or module wrapping.
  • Keeps existing full-resolution behavior for other callers.
  • Adds async and sync regression tests for module identity and export-assignment aliases.
File Description
tsc/​internal/​checker/​nodebuilder_hover.go Keeps full alias resolution for hover expansion.
tsc/​internal/​checker/​checker.go Restores nonrecursive immediate alias lookup.
packages/​typescript/​test/​sync/​api.test.ts Adds synchronous alias regression tests.
packages/​typescript/​test/​async/​api.test.ts Adds asynchronous alias regression tests.

Review effort: Balanced

This branch has not been deployed

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

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

[API] getImmediateAliasedSymbol returns a different symbol than classic tsc

2 participants