typescript type from enum values typescript enum value to enum

The solution for “typescript type from enum values typescript enum value to enum” can be found here. The following code will assist you in solving the problem.

enum Weekday {
MONDAY = ‘mon’,
TUESDAY = ‘tue’,
WEDNESDAY = ‘wed’
}

type WeekdayType = `${Weekday}`;
enum Number {
One,
Two
}

const numberOne: Number = “One” as Number;
const otherNumberOne: Number = Number.One;

const stringOne = Number[Number.One];

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in