Skip to content

Conversation

@PierceLanternStudios
Copy link

Written as a proposed solution to #55593.

Note that like 95% of the changes for this PR come from updating test baselines, since my solution involves the use of a timeout inside the session.

Solves the issue of namespace shadowing by checking for "typey" definitions in comparison with the kind of the node selected. If its not possible to narrow to one definition, defaults to the current behavior of showing all options. Additionally, if the same symbol is go-to-definitioned on twice within 5 seconds, this will show all definitions as a backoff system.

Tested locally + with hereby runtests

@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 28, 2025
@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

@PierceLanternStudios
Copy link
Author

@microsoft-github-policy-service agree

@rattrayalex
Copy link

Hey @DanielRosenwasser & Ryan, curious for your thoughts here! I think it'd make a huge difference for devs using the Stripe, OpenAI, Anthropic, and similar SDKs, which make heavy use of a namespace/interface shadowing pattern for easy type imports.

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.

4 participants