mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibJS: Allow full ModuleExportName in namespace
This means we should accept a string after 'export * as '.
This commit is contained in:
parent
75ebcf6b4a
commit
f75c51b097
3 changed files with 46 additions and 32 deletions
|
@ -1,6 +1,17 @@
|
|||
import * as indirectNs from "./default-and-star-export-indirect.mjs";
|
||||
// This is an all-but-default export and should thus only provide "*" and "".
|
||||
// default-and-star-export-indirect.mjs:
|
||||
// export * from "./default-and-star-export.mjs";
|
||||
|
||||
import * as indirectNsString from "./default-and-star-export-indirect-string.mjs";
|
||||
// This is an all export and should thus provide the full namespace.
|
||||
// default-and-star-export-indirect-string.mjs:
|
||||
// export * as "viaString" from "./default-and-star-export.mjs";
|
||||
|
||||
export const passed =
|
||||
indirectNs["*"] === "starExportValue" &&
|
||||
indirectNs[""] === "empty" &&
|
||||
indirectNs.default === undefined;
|
||||
indirectNs.default === undefined &&
|
||||
indirectNsString.viaString["*"] === "starExportValue" &&
|
||||
indirectNsString.viaString[""] === "empty" &&
|
||||
indirectNsString.viaString.default === "defaultValue";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue