Answers for "enum angular"

14

typescript enum to string

enum AnEnum {
    One = 1,
    Two = 2
}
let stringOne = AnEnum[1]; // "One"
let stringTwo = AnEnum[AnEnum.Two]; // "Two"
Posted by: Guest on March-30-2020
1

enum angular

enum Direction {  Up = 1,  Down,  Left,  Right,}Try
Posted by: Guest on April-15-2021
5

enum in ts

enum Direction {
    Up,
    Down,
    Left,
    Right,
}
Posted by: Guest on May-28-2020
1

declare enum in type script

enum PrintMedia {
  Newspaper = 1,
  Newsletter,
  Magazine,
  Book
}
Posted by: Guest on August-26-2020
3

ts enum

enum Response {
    No = 0,
    Yes = 1,
}

function respond(recipient: string, message: Response): void {
    // ...
}

respond("Princess Caroline", Response.Yes)
Posted by: Guest on May-05-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language