Skip to content

Commit ba799d7

Browse files
committed
Normative: make re-exporting a namespace object behave more consistently
1 parent e936549 commit ba799d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28335,10 +28335,11 @@ <h1>
2833528335
1. If _importedBoundNames_ does not contain _ee_.[[LocalName]], then
2833628336
1. Append _ee_ to _localExportEntries_.
2833728337
1. Else,
28338+
1. NOTE: When exporting a binding or namespace object which was originally imported from another module, the ExportEntry Record is rewritten to match the form it would have if the binding or namespace object had been re-exported directly from the original module rather than imported then exported.
2833828339
1. Let _ie_ be the element of _importEntries_ whose [[LocalName]] is _ee_.[[LocalName]].
2833928340
1. If _ie_.[[ImportName]] is ~namespace-object~, then
2834028341
1. NOTE: This is a re-export of an imported module namespace object.
28341-
1. Append _ee_ to _localExportEntries_.
28342+
1. Append the ExportEntry Record { [[ModuleRequest]]: _ie_.[[ModuleRequest]], [[ImportName]]: ~all~, [[LocalName]]: *null*, [[ExportName]]: _ee_.[[ExportName]] } to _indirectExportEntries_.
2834228343
1. Else,
2834328344
1. NOTE: This is a re-export of a single name.
2834428345
1. Append the ExportEntry Record { [[ModuleRequest]]: _ie_.[[ModuleRequest]], [[ImportName]]: _ie_.[[ImportName]], [[LocalName]]: *null*, [[ExportName]]: _ee_.[[ExportName]] } to _indirectExportEntries_.

0 commit comments

Comments
 (0)