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

Editorial: Handle non-direct binding cases in ResolveExports #3488

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kimjg1119
Copy link
Contributor

In step 6.a.iv.3 of ResolveExport, the case where e.[[ImportName]] is ALL, indicating that the module does not provide a direct binding, is addressed. I’m uncertain but curious whether we should also handle other cases such as ALL-BUT-DEFAULT and null in this context.

c.f. This is problematic because the recursive call in step 6.a.iv.4 requires exportName to be a string. Therefore, the remaining cases should be explicitly handled in some way.

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Nov 20, 2024

ALL-BUT-DEFAULT is only used for export * from "foo", which has [[ExportName]] set to null and thus can never happen here. I would prefer if we added an assertion after step 6.a.i saying that [[ImportName]] is not ALL-BUT-DEFAULT.

It might be helpful to look at Table 58: the only cases that can happen in this code path are those where the first two columns are not null.

@kimjg1119
Copy link
Contributor Author

kimjg1119 commented Nov 20, 2024

Thank you for clarifying! I replaced it with an assertion instead.

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.

3 participants