Skip to content

Commit

Permalink
Editorial: Narrow return type of GetExportedNames.
Browse files Browse the repository at this point in the history
With two assertions to make clear the validity of narrowing. This is an
exact copy of the change proposed in the PR tc39#3127(tc39#3127).
  • Loading branch information
doehyunbaek committed Sep 5, 2023
1 parent b12a244 commit ff2afaa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -27707,7 +27707,7 @@ <h1>
<h1>
GetExportedNames (
optional _exportStarSet_: a List of Source Text Module Records,
): a List of either Strings or *null*
): a List of Strings
</h1>
<dl class="header">
<dt>for</dt>
Expand All @@ -27723,9 +27723,11 @@ <h1>
1. Let _exportedNames_ be a new empty List.
1. For each ExportEntry Record _e_ of _module_.[[LocalExportEntries]], do
1. Assert: _module_ provides the direct binding for this export.
1. Assert: _e_.[[ExportName]] is not *null*.
1. Append _e_.[[ExportName]] to _exportedNames_.
1. For each ExportEntry Record _e_ of _module_.[[IndirectExportEntries]], do
1. Assert: _module_ imports a specific binding for this export.
1. Assert: _e_.[[ExportName]] is not *null*.
1. Append _e_.[[ExportName]] to _exportedNames_.
1. For each ExportEntry Record _e_ of _module_.[[StarExportEntries]], do
1. Let _requestedModule_ be GetImportedModule(_module_, _e_.[[ModuleRequest]]).
Expand Down

0 comments on commit ff2afaa

Please sign in to comment.