Answers for "ts enum"

0

ts enum

enum vscode {
    good,bad,medium
}

console.log(vscode.bad)
Posted by: Guest on November-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 "TypeScript"

Browse Popular Code Answers by Language