Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why IIFE? #11

Open
gamedevsam opened this issue Oct 27, 2021 · 0 comments
Open

Why IIFE? #11

gamedevsam opened this issue Oct 27, 2021 · 0 comments

Comments

@gamedevsam
Copy link

In your code you wrap all exported classes in an immediately invoked function expression. But you're also using ES Modules.

Why do this?

export const something = (() => {
    class Something {}
    return { Something: Something };
})();

Instead of this?

export class Something {}
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

No branches or pull requests

1 participant