Skip to content

Why IIFE? #11

Open
Open
@gamedevsam

Description

@gamedevsam

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 {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions