Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typescript): add flag follow aliases when emitting refs #5563

Merged
merged 1 commit into from Apr 1, 2023

Conversation

nbeloglazov
Copy link
Collaborator

This PR adds flag that allows follow aliases when retrieving TS symbols for nodes in AST. It relies on TS API and should work well and support multiple levels of aliases.

This fixes bug where today xref is not produced for the following case:

// a.ts
export const value = 42;

// b.ts
export {value} from './a';

// c.ts
import * as b from './b';
b.value;

Previously there were no xref from b.value to value definition. Now there is.

Also it will help to get rid of our custom alias collapsing that uses localSymbolToRemoteReassignMap once launched. I didn't know that I could achieve the same result using TS API when I implemented it originally.

@nbeloglazov nbeloglazov merged commit 18c2093 into kythe:master Apr 1, 2023
4 checks passed
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.

None yet

2 participants