typescript enum to string
enum AnEnum {
One = 1,
Two = 2
}
let stringOne = AnEnum[1]; // "One"
let stringTwo = AnEnum[AnEnum.Two]; // "Two"
typescript enum to string
enum AnEnum {
One = 1,
Two = 2
}
let stringOne = AnEnum[1]; // "One"
let stringTwo = AnEnum[AnEnum.Two]; // "Two"
enum angular
enum Direction { Up = 1, Down, Left, Right,}Try
enum in ts
enum Direction {
Up,
Down,
Left,
Right,
}
declare enum in type script
enum PrintMedia {
Newspaper = 1,
Newsletter,
Magazine,
Book
}
ts enum
enum Response {
No = 0,
Yes = 1,
}
function respond(recipient: string, message: Response): void {
// ...
}
respond("Princess Caroline", Response.Yes)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us