Skip to content

Conversation

@nicolo-ribaudo
Copy link
Member

#5 (comment)

This PR makes it an error to make export { foo } from "x" of a binding that was exported as export defer { foo } from "somewhere else", since it nullifies the benefits of defer. Developers would still be able to force this behavior by doing import { foo } from "x"; export { foo }, but it prevents them from doing accidentally.

I plan to discuss this PR at the next plenary.

1. Let _resolution_ be _module_.ResolveExport(_e_.[[ExportName]]).
1. If _resolution_ is either *null* or ~ambiguous~, throw a *SyntaxError* exception.
1. Assert: _resolution_ is a ResolvedBinding Record.
1. <ins>If _resolution_.[[Module]] is a Cyclic Module Record and _e_ was exported by an |ExportDeclaration| with an |ExportFromClause|, then</ins>
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a tiny bit hand-wavy, I plan to add an internal slot on Source Text Module Record that lists the bindings that "were exported by an |ExportDeclaration| with an |ExportFromClause|".

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.

2 participants