Skip to content

TypeScript enums#277

Description

@osnoser1

馃敄 Enhancement description

Is there a way to, instead of generating enums, generate types and constants, e.g.

馃帳 Pitch

From:

export enum ItemsRunItemOrigin {
  TEMPLATE = 'template',
  CARRYOVER = 'carryover',
  ADHOC = 'adhoc',
}

to

export const ItemsRunItemOrigin = {
  TEMPLATE = 'template',
  CARRYOVER = 'carryover',
  ADHOC = 'adhoc',
} as const;

export type ItemsRunItemOrigin = typeof ItemsRunItemOrigin[keyof typeof ItemsRunItemOrigin];

Thank you very much in advance

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions