Skip to content

get array from const enum #38960

Closed
Closed
@wangzhilongh

Description

@wangzhilongh

I hope there is a way to get an array from const enum.

for example:

const enum gender{
male = 1,
female = 2,
}

I need to there is a way to get an array from the const enum gender, and the result like this:
[1,2]

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    UnactionableThere isn't something we can do with this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions