Skip to content

Deprecate default export - #50

Open
Gouvernathor wants to merge 2 commits into
squirrelchat:mistressfrom
Gouvernathor:no-default
Open

Deprecate default export#50
Gouvernathor wants to merge 2 commits into
squirrelchat:mistressfrom
Gouvernathor:no-default

Conversation

@Gouvernathor

@Gouvernathor Gouvernathor commented Dec 31, 2025

Copy link
Copy Markdown
Contributor

I think this use is not what default is made for, and that this feature (of importing everything in an object) is better covered by the native MJS syntax of import * as.

Benefits of that syntax: the "namespace object" is sealed, and has a null protoype, which is not the case of the literal object I'm deprecating here.
Also, removing the default export (which can be done in the next major version) removes the "default" key from the namespace object.

@cyyynthia

Copy link
Copy Markdown
Member

I've just updated the README for now: f0e0399

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