Skip to content

TypeScript: use union types instead of enums #179

Closed
@slorber

Description

@slorber

I'm using latest webpack-merge 5.*

There are a ton of reasons to not use enums in TypeScript anymore (it's not std JS), particularly if you don't even benefit from its nominal typing.

The main one I'd give in this context is that your readme examples do not work out of the box, as it requires to import the enum before being able to use it.

image

image

Activity

added a commit that references this issue on Jun 7, 2021
be7e614
bebraw

bebraw commented on Jun 7, 2021

@bebraw
Member

Can you check #185 ? To avoid breaking backwards-compatibility, I added strings as an option there so that IDEs shouldn't complain anymore.

slorber

slorber commented on Jun 7, 2021

@slorber
Author

thanks @bebraw , LGTM!

added a commit that references this issue on Jun 7, 2021
5cb501e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @bebraw@slorber

      Issue actions

        TypeScript: use union types instead of enums · Issue #179 · survivejs/webpack-merge