Skip to content

Resolve aliases before using getTypeReferenceType#24594

Merged
weswigham merged 1 commit into
microsoft:masterfrom
weswigham:fix-aliased-import-type-lookup
Jun 4, 2018
Merged

Resolve aliases before using getTypeReferenceType#24594
weswigham merged 1 commit into
microsoft:masterfrom
weswigham:fix-aliased-import-type-lookup

Conversation

@weswigham
Copy link
Copy Markdown
Member

While looking at this comment, I couldn't repro the reported issue (a visibility error); but I could witness another problem with the generated file:
image

As it happens, getTypeReferenceType silently returns undefined on Aliases (resolveEntityName never returns an alias and is the only other place symbols come from when they are passed into it). So externally aliased types (aka those looked up via export specifiers) couldn't be found.

@weswigham weswigham requested a review from mhegazy June 1, 2018 21:06
@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Jun 4, 2018

man.. that is subtle..

@weswigham weswigham merged commit cbbf2e4 into microsoft:master Jun 4, 2018
@weswigham weswigham deleted the fix-aliased-import-type-lookup branch June 4, 2018 21:19
@weswigham
Copy link
Copy Markdown
Member Author

@mhegazy should this be ported to 2.9 since it fixes a bug in generic import type resolution?

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Jun 4, 2018

yes please.

weswigham added a commit to weswigham/TypeScript that referenced this pull request Jun 4, 2018
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants