mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
LibJS: Follow the spec with storing im- and export entries
Because we can have arbitrary in- and export names with strings we can have '*' and '' which means using '*' as an indicating namespace imports failed / behaved incorrectly for string imports '*'. We now use more specific types to indicate these special states instead of these 'magic' string values. Do note that 'default' is not actually a magic string value but one specified by the spec. And you can in fact export the default value by doing: `export { 1 as default }`.
This commit is contained in:
parent
8473f6caee
commit
e0e4ead2c8
Notes:
sideshowbarker
2024-07-17 19:59:20 +09:00
Author: https://github.com/davidot
Commit: e0e4ead2c8
Pull-request: https://github.com/SerenityOS/serenity/pull/12165
Reviewed-by: https://github.com/linusg ✅
11 changed files with 190 additions and 96 deletions
|
@ -0,0 +1,6 @@
|
|||
import * as indirectNs from "./default-and-star-export-indirect.mjs";
|
||||
|
||||
export const passed =
|
||||
indirectNs["*"] === "starExportValue" &&
|
||||
indirectNs[""] === "empty" &&
|
||||
indirectNs.default === undefined;
|
Loading…
Add table
Add a link
Reference in a new issue