I am working with a simple enum called errorCode, shown below:
export enum SomeErrorCodes {
none = 0,
notFound = 1,
duplicated = 2
}
Currently, I am receiving the name of the enum as a string "SomeErrorCodes" and a number, for example, 1. How can I convert these into SomeErrorCodes.notFound
in TypeScript?
Appreciate any help!