Skip to content

Conversation

@andrewbranch
Copy link
Member

Fixes #48701

This is just more of #37964, but for our own lookups of __esModule. This function is literally only called with "__esModule" and InternalSymbolName.Default, so I can guarantee it doesn’t need to look at the global object type for those.

@andrewbranch andrewbranch marked this pull request as ready for review February 2, 2023 00:29
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Feb 2, 2023
function resolveExportByName(moduleSymbol: Symbol, name: __String, sourceNode: TypeOnlyCompatibleAliasDeclaration | undefined, dontResolveAlias: boolean) {
const exportValue = moduleSymbol.exports!.get(InternalSymbolName.ExportEquals);
const exportSymbol = exportValue ? getPropertyOfType(getTypeOfSymbol(exportValue), name) : moduleSymbol.exports!.get(name);
const exportSymbol = exportValue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be adding a note or something just as a reminder would be good. (that its called for default or __esModule

@andrewbranch andrewbranch merged commit 4ec9b2f into microsoft:main Feb 2, 2023
@andrewbranch andrewbranch deleted the bug/48701 branch February 2, 2023 17:27
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TS language service keeps crashing

3 participants