typescript type from enum values

Solutions on MaxInterview for typescript type from enum values by the best coders in the world

showing results for - "typescript type from enum values"
Youna
27 Jan 2020
1enum Weekday {
2  MONDAY = 'mon',
3  TUESDAY = 'tue',
4  WEDNESDAY = 'wed'
5}
6
7type WeekdayType = `${Weekday}`;
8
Alberto
12 Aug 2020
1enum AnEnum {
2    One = 1,
3    Two = 2
4}
5let stringOne = AnEnum[1]; // "One"
6let stringTwo = AnEnum[AnEnum.Two]; // "Two"
Juliana
19 Oct 2016
1enum Response {
2    No = 0,
3    Yes = 1,
4}
5
6function respond(recipient: string, message: Response): void {
7    // ...
8}
9
10respond("Princess Caroline", Response.Yes)
11
Lili-Rose
29 Aug 2020
1enum Number {
2  One,
3  Two
4}  
5
6const numberOne: Number = "One" as Number;
7const otherNumberOne: Number = Number.One;
8
9const stringOne = Number[Number.One];
queries leading to this page
return enum type from function typescriptenums in tstypescript type enum valuesdeclare enum in typescriptconvert value to enum in typescripttypescript enum key valueenumeration in typescriptenum tstypescript enum syntaxenums in typescript classtypescript enum value ofreact enum stringcreate enum typescript angular 9property value to enum typescriptstring of an enum typescriptenum values angularcheck n umeric value of enum in angular 6enum next value angularenums angular8defining the enum types in typescripttypescript enum or interfacesassign enum value typescript from stringhow to get value from enum in typescriptglobal inline enums typescripttypescript create enum from objecttypescript enum key with 2 values 3ftypescript expose enum valuesget enum by value typscripttypescript enum list of values typetypescript value of enumtypescript enum descriptionangular emumnode ts enumstring to string enum tsvalue to enum typescriptenum in ts as variableenum javascripttypescript enum string and numberenum to string value in typescripttypescript type of enum keytypescript string as enumjs enum examplehow to have string in enums in tstypescript enum with propertieshow to check typeof of enum in typescripttypescript enum as keymake string enum index object typescripttypescript enum with levelstypescript how to convert enum to stringcan an enum be used as type typescripttypescript enum as a typetype enum typescript numbertypescript enum function javascriptenumerador typescriptangular define const enumtypescript enum to valueusing enums in typescripttypescript set enum valuetypescript interface enumtypescript define enumtypescript to return enum valueenum and typescript vs jstypescript creating enumtypescript string enumbstypescript enums examplestypescript enum to string arraydestructure enum typescripttypescript return enum typetypescript get enum valuetypescript using enum as typetypescript type should include all enum valuestypescript enum number to stringenums in reactmemeber of enum typescripttype value of string enums typescriptjavascript enum typescripttyscript enumstypescript enumm as valuetypescript ts node convert all enum to const enumangular print enum valuets enum as stringtypescript enum 5b 5denum valueof typescripttypescript declare enumsnodejs enum reverseget enum value typescriptstring enum type scripttypescript get string value of enumtypescript enum value stringenumeration angularenum typescript inttypescript string enumstypescript keyof to enumtypescript comment enumtypescript wrte enum in interfacecreate a type of enum typescriptts how to use enumstypescript type from enum valuestypescript type of value of enumenumerations typescripthow to create enums in typescripttypescript enumerationenum or type typescriptenum value in typescriptuse string enum in mapping typescripttypescript enum class exampletypescript get enum as stringtypescript value of enum to stringdefine enum typescripttypescript get type values of enumtypescript enum and idemuns in typescriptenum in react jstypescript enum access valueangular enum valuetypescript specify enum typetype for enum typescripttypescript declaration enumtypescript string in enumstirng or number ts enum in functionenum sample tsangular string enum config filetypescript typed enumuse typescript enum in javascriptwhat is a enum type in typescripttypescript print enum valuetypescript enum as numberenum to string tsstring enum typescript to object typestring enum to string enum typescriptenum angular stringtypescript get enum by valuehow to assign enum in typescriptget value of string enum typescriptconst enum vs enumboolean enum typescriptjs enumallow two enum string typescriptget enum string value typescriptenum in enum typescriptwhat use enum in typescripttypescript emumtypescript enuimtypescript emuntypescript enum with numberstypescript cast enum to enumhow to define enum in angulartypescript type an enumangular create enumts enum type create options arrayenum nedir typescripttypescript enum from objecttypescript string to enum nameangular enum exampletypescript type values of enumassign enum value typescriptget the string of enum in typscriptts enum get string valuehow to add enum values in typescripttypescript get enum type from stringtypescript enum numbersinterface typescript string from enumtypescript number to enumenum typescript angulartypescript string value of enumtypescript export enumget string value of enum typescripcts interface for response enumtypescript enum get valueenum keyword jsenum type angularnumeric enum typescriptangular 9 enum to stringinline enum typescripttypescript type enumtypescript enum inside enumenum as types in typscriptreact enumstypescript enum stringsspecifying enum in interface typescriptenum type typescriptenum as type typescripttypescript enumerablereference enum typescripttypescript print enum namejavascript enum to stringenum variable typescriptenum values typescripttypescript enum from numbertype script specify field to one of enum valusts string to key of enumenum data type in typescriptenum prefix tstypescript enum valueof 28 29angular next enum valuetypescript type from enumtypescript enum with other enumstypescript get the key of an enumtypescript reference enumtypescript int enumtypescript how to use enumsenum in typescript classenum in interface typescriptangular declare enumtypescript enum typeenums angulartypescript using enumenum vs interface typescriptenum typescript typejavascript enum typets enum definitiontypescript named enum select number valuehow to find the type of a typescript enumenum types tsenum number typescriptenumerator typescripttypescript number enumtypescript enum map get defaulttypescript access enumtypescript return type of enumtypescript get value of enumtypescript enum number stringstring enum typescript get valuehow to name enums typescripttypescript convert enum to string literal react enumtypescript enum member typetypescript enum 3dif something equals enum value return the property typescripttypescript enum name to stringget values from enum typescripthow to get value from enum typescriptenum to string type typescripttypescript one value of the enumtypescript enum values stringtypescript type of enum valuesenum value as in java typescriptenum values in typescripttypescript type for string or enumtypescript enu 2ctypescript enum with values javatypescript keyof enumtypescript enum numberwhat is a typescript enumtypescript type to enumtypeof enum typescript how to access enum in typescriptuse enum as a type of variable in typescripttypescript enum to numberget enum name from value typescripttypescript enum functiontypescript enum value typets string to enumenums tsenumb keys and values angular assnged as valuestypescript define type variable enumtypescript enum integerenum string to number typescriptstring to enum in typescriptenum of strings typescript enumartion typescripthow to read enum data in typescriptstring as enum typescripttypesript enumenum typescript as typeget string of enum typescripttypescript assign enum to stringtypescript enum 2c getkeytypescript is value in enum typescript get string from enumtypescript default enumtypescript string enumangular string enumenum 7c null tsenum type in typescripttypescript check if enum to lowercase contains valuedeclare enum in angularenum generated by interface typescripttypescript enumeratorts enumtypescript read enum as stringtypescript enum from string enum to number typescriptaccess enum ky stirng keyset enum by number typescripttypescript enum with objecttypescript enum with object valueshow to define datatype as enum in typescriptcreate enums in typescriptenum of values jstypescript const enum vs enumdefine an enym typesctipt angularuser type for enum typescriptangular enum to stringpath as an enum typescripttypescript enums angulartypescript enum optionalenums in typescript when to usediff bw enum and tuple in typescripttypescript set enum to lowercaseenum with type typescriptwhat are enum in typescriptconvert enum to text and value in typescriptstring enum typescriptenumerated data types 28enums 29 are a set of numeric values with more friendly names it 27s an addition on top of javascript that typescript offers type enum in typescripttypescript one of enum values as typeusing an enum vs readonly variable typescriptmeaning enum angularenum in typescript cangular enum in enumtypescript get enum valuestypescript enum that take calues of enumsenum as a type typescripttypescript value of enum as keytypescript strings enumangular export type enumtypescript enums with boolean valuechange enum values to string in tsenum from value typescripttypescript variable type enum angularenum value typescripttypescript enum inside classtypescript how to get type on enum valuetypescript enum with string valueswhen to use enum in typescripttypescript enum booleanjs enum consttypescript enum give variable value of enumwrite enum in typescript in interfacekey as enum case typescritptypescript mapping enumenum typescript stringparse enum typescripttypescipt using enum htmlis in enum typescripttypesrcipt string enumtypescript enum string to stringhow format a enum string in typescript from another filebest practice angular where declare enumhow to declare enum type in typescripttypescript object property as enum in typeenum typescript show valuesget reverse enum value typescripttypescript enum declarationtypescript enum insteadreact js enumtypescript how to use enumenum in type typescripttypescript isenumdeclarationts anonymous enumtypescript enumenum reacttypescript enum add valueget the value of an enum javascriptstring enum to string typescriptdifference between enum and objectts type from enum valuesjavascript numeric enum exampletypescript string of enum typeenum typescript keyoftypescript enum value from namehow to assign enum value in typescripttypescript enum to javascriptvalues of enum typescripttypescript type one of enumts enum tostringconvert enum to array tstypescript enums exampeltypescript name of enumts doc enumtype from enum values typescriptenum types typescriptassigning an enum value in typescriptangular string to enumtypescript enumerate enumenum in react typescripttypescript enum values as keysgiving types to enumusing emun typescriptangular enum declarationangular enums nodeas enum typescripttypescript create enum keys as enumwhen to use typescript enums reacttypescript enum with methodsenum strings typescriptcan we have single value enum typescriptts string enumsubscribe enum angulartypescript enum parameterdifferent enums with same name typescriptnodejs typescript parse string to enumangular enum conventiontypescript initialize enumenumerable typescripttypescript enum with object valueconst javascript const string enumenum angularenum typescript conventionbuild custom type from enum typescriptstring to enum typescriptchange enum value attribute to string in tswhen use enums typescripttypescript default enum valueenum structure angularget request enum typescripttypescript interface enum typestring enumeration jsenum in angular 6angular use enum incall an enum insdie other enum typescriptnew set enum typescriptreact typescript define enumsenum naming convention typescriptenum angular exampletypescript enum fieldsts enum stringtypescript enum jstypescript typeof enum typescript enum tutorialtypescript enum with string value exampleenum index starts from typescriptreference to enum value typescripttypescript get enum by stringtypescript create enumhow to define enum in typescripttypescript enum methodenum name must have one of the following suffixes typescriptenum null typescriptset enum type in typescriptwhat methods can be called on typescript enum 3fshared enums typescriptts enum of stringstypescript enum best practice uppercaseget value from id in enum in typescripttypescript convert number to enum typetypescript enum string number keytypescript enum valuesusing enum in typescriptenum string typescriptts using enum as a typeenum type as key typescriptenums typescripthow to use enum in angularenum as string typescripttypescript enum valueof typescript as enumaccess enum with string tsget string from enum typesciptuse enum typescripttypescript string enumeratorenum in angular 8get the string from enum tstypescript enum in values asvalueof enum typescriptts print enum valuetypescript union enumtypescript must be a value of enumenum tostring typescriptvalue of enum angulartypescript typeof enum valuetypescript react value of enummake a type of enum typescriptts enum in classangular enumtypescript type hint all enum valuesangular inum examplestypescript get sting enum as objectenums type scriptkeyof typescript enumenum case typescript conventionusing enums in angular typescripttypescript set a type as a result of an enum keyenums typescripts exampleshow to create enum in angularts enum exampleenum in typescriptget value of enum typescripttypescript enum get key by string valueenum to string jstypescript get enum value as stringjs enum with valueenum in jsenum of objectrs typescript exampletypescript enum name and valuetypescript enum of typetypescript enum string numberusing enum in angularget string value of enum typescripttypescript string enumhow to provide treeshakable enums typescriptnumber to enum in typescripttypescript enum compiledtypescript enum get valuests convert enum to stringhow to create a enum in typescriptenum to string javascriptcreate enumns in angularcreate enum in angular 8enum interface typescripttypescript type from enum keystype of enum typescripttypescript how to access enum property when value is a stringget value of an enum typescriptts get enum valuests enums as typetypescript enum classcan we singl value enum typescriptangular enum 2cstypescript enum to string 5b 5dtypescript enum from valueangular typescript enumget properties by value enum typescripttypescript enumerated typetypescript type of enumhow to access enum tsangular get value of enumtypescript enum with valuetypescript enum 2ctypescript enums examplecreate enum of strings typescripttypescript return enum keytypescript get enum stringhow enum in type typescriptts enum to stringdisplay enum value typescripttypescript enums as typeshow to declare type of enum field in typescriptset type of enum typescriptchange enum attribute to string in tsenum keyword in typescriptconvert enum to string array typescriptobject values enum typescripttypescript enum variablets enumerationexport enum in typescripttypescript value of enum typeusing enum typescript angulartypescript type string of enum typeenum as strings typescripttype typescript enumtypescript ennumtypescript any enum typetypescript enum object valuestypescript enum objectget enum property name typescript by varabletype of variable enum typescripttypescript numeric enum to stringvariable of type enum typescriptenum values as type typescripttypeof enum values typescriptts enum value from stringhow to use enum typescriptcreate enum from object typescripttypescript interface enum stringenum example in typescriptget string enum typescripttypescript enum operationstypescript type of enum valuetypescript enum string and number valuework with enum typescriptenum type typescript array typescript function return enumtypescript enum tostirngenum ts exampleenum that returns string typescriptset with enum typescriptjavascript type enumts enum 3fget string from enum in typescripttypescript enum in a enumtype enum typescripttypescript base interface subtype of enumtypescript enum ldeclare enum typescriptwhat is angular enumtypescript ebumtypescript enum with associated valueshow to use enum as type in typescripttypscript enum as stringsweirdusing enum in interface typescripttypescript get enum number from stringtypescript enum value to keytypescript enum value 27s typetypescript enum type as parameterdefine type of enum typescriptmake an enum containing string value with key in tstypescript enum defined how to use enum in different enum typescriptenum in javascripttypescript enum is 0typescript enumskey value enum tsenum value as type typescripttypescript enum to string literalhow to type an enum typescripttypescript interface string enumtypescript enum as typeuse enum as type typescript best practicetypescript enum listtypescript enum one to manytypescript how to access enum property from valuetypscript enum value to keywhy use type enums typescriptangular interface enumtypescript config array vs enumtypescript enum to string valuejavascript enum stringenum 5b 5d typescriptset of type enum typescripttypescript enum naming conventiontypescript is in enumtypescript enum nameangular enum model numbertypescript any enum as valuedeclare an enum in typescripttypescript enumenum type in typescripttypescript type valueof enum typescript enum tostringtypescript enum example number 2c stringconvert string to enum typescripttypescript enum as valueenumeration in react jsangular enums fileenum example tydate as enum in typescripttypescript enum as object keywhen to use enumtype in typescriptconst enum typescriptvalue in enum typescriptcreate type from enum values in typescripttypescript int to enumhow to use enums in typescripttypescript enum fieldenum key of typescripttypescript is string enum casetypescript enum from keycan i have a place holder to enum typescriptenum typescript to stringhow to specify enum in typescriptwhat is export enum in typescripthow to make a string based enum with angular 7enum types in typescriptparse enum values typescripttypescript assigning an enum to an objecttypescript key value enumtypescript manually change enum valuetypescips enum exampletypescript type as enumtypescript create enum from numbertypescript require parameter to be enum but not stringcreate an enum typescripttypescript enum stringenum example tsreact typescript definition type enum objectenums in angulartypescrpt enum without valuejavascript enum with string valueshow to convert number to enum in typescriptenum strings javascripttypescript enum javascriptdonswids to enum angularcreate typescript enumtypescript enums with valuestypescript string type enumhow to enumerate typescript enumexport enum typescripttypescrip enum to stringenum name of value typescripthow to define enum typescriptonly numeric enums can have computed memberstypescipr enum interfacesetting a value from enum typescriptis value in enum typescripthow to import enum in typescriptget enum by number tstypescript one of enumcreate a type enum in typescriptangular enum consttypescript code to make an enum with multiple objectstypescript enum in classget enum type typescriptuse typescript type as enumtypescript enum propertyenums as alias strings angulartypescript functions in enumsangular enum namingenum with defined type typescriptenum typescript key valueuse enum as type typescriptenum from constant typescripttypescript create enum typetypescript string as enum valueenum add 7c typets enum value objectenum of enums tstypescript enum as a string javascripttypr of enum type in typescriptassign types to enum constantsstring value emun typescriptenumeration typescripttypescript string is enumtypescript enum with stringenum boolean typescripttypescript typeof enumwhich of the following is the right way of defining enum 3ftypescript number to enum stringtypescript specify enum as a typetypescript enum interfacetypescript tester us enumdifference between interface and enum typescriptobtain the type of enum in typescriptenum entries angulartypescript enum get by valueenums typesvcriptenum typescript stringsenum as const and none constassign a enum value to a variable typescriptennum in angular tstype script enum accesstss enum create enums typescripttypescript type of enum keysget emums in typescriptstypescript type use enumdeclare enum in typescript classstring enum and int enum typescriptenums in typescripttypes enum typescriptdefining enum in typescriptcreate enum from number typescriptdata type enum typescripttypescript enums with string valuesytypescript refer to enum as stringtypescript enum but with stringtypescript enum 5b 5denum string typetypescript enum value by keytypescript enum booleantypescript type enum stringtypescript enum tostringtypescript what is type of enumenum methods tstypescript type of part of enum valueshow to get value from enum angulartypescript enum key typestring enum javascriptusing enums angular 8typescript enumb const errorwhat is enum in typescripttypescript enum with variablesyntax typescript interface string enumget enum string javascriptvalue from enum as a type typescriptconvert string enum value to enum typescriptis an enum a string typescriptenum uppercase or lowercase typescripttypescript for in enumtypescript allow string to enumexport valueof enum typescripttypescript enum with interfaceenum data type typescriptget enum values typescripttypescript string to enumdefine enum in typescriptnumber to enum typescriptenum jstypescript enum as stringenum with values typescriptenum typescriptdefine type enum typescripttypescript function enum returntypescript get enum typetypescript refer enum typenodejs create typescript enumtypescript type is from enumangular check enum value of stringtypescript enum capitalizationenums as strings angulartypescript value in enumangular enum string valueusing enum as type in typescripttypescript return type string of enum valuetypescript key of enum typetypescript enum by stringtypescript enum typestypescript create type from enumts enum string valuehow to make enum type accepts any string typescripttypescript type enum to valuesreact typescript definition type enumhow to use enums typescriptstring enumsconvert enum to string typescriptwhat enum in angularcreate type from enum keys in typescriptdifference between enum let and const in reactenum in typescript exampletypescript value enumtypescript types key value enumstring value to enum typescriptjs enum to stringis is const enum typescriptare enums readonly typescriptclass enum in reactstring enum value tstypescript enum exampleenum from object typescriptusing enum in angualrtypescript enum from value to keytype value of enum typescripttypescript number to enum typehow to use enum as values in typescriptts get string value of enumtypescript how to write a function with enum return typeenum string to enum typescriptcreating method enum typescripthow to use typescript enumstypescript enum itemtypescript declare object where every property must be from an enumenum exaample typescripttypescript use enum value in html value attributetypescript enum as a stringset of enum values in typescriptemnum in jstypescrip string enumenums reacttypescript value is in enumtypescript typed enums get keytypescript enum get stringhow to set enum value in typescriptjavascript anum in stringusing types with enum typescript errortypescript get name of enum valuetypeof 28enum 29 in angularenum typescript numbervalueof typescript enumtypescript constant stringsenum react jstypescript enum type exampleangular enum exampkeenum in angulartypescript enum valueenum get string value typescriptenum declaration typescriptstring enum angularset ts enum valueenum number to value typescripttypescript enum boolean valuetype enum string typescriptwhere to put enum in typescripthow to send enum from typescript to javatypescript enum of number valuetypescript js enum 2cwhat are typescript enumtypescript nameof enumget enum based on string typescriptdoes typescript support enum typesenum typescript functionenum to string angularenum number to string typescriptenum with string values tswrite enum typescriptassign enum type angulartypescript enum usetypescript cannot fine name enum function return enumenum key to string typescripttypescript enum to typeinline const enums cannot iterate typescripttypescript insert value into enumhow to create enum in typescripteaccess enum in class tstypescript print enum stringtypescript enum from string valueenum key value typescriptenum typescript get valueshow to create a enum reacttypescript from enumvariable of type enum value in typescriptwhy we need enum in typescripttype enum javascript exampletypescript enum value to stringinterface typescript includes every item of enumhow to make enum in typescripttypescript enum value equal to name of enumget text from enum typescripttypescript type string object enumisenumdeclaration typescriptkeyof enum typescripttypescript value from enumdifference between enum let and const in typescripttypescript data type enumenujm in typescripttypescript enums stringwhen to use a typescript enum typescript string error enum typescript enum with valuesenum type in javascriptenum ts chainingenum numbers angulartypescript enum react typescript enum with stringstypescript 24values enumhow to make enum in angularenum with string values typescripthow use enum in typescript typetypescript enum definitionts get enum by stringtypescript enum conventionshow to create a typescript enumtypescript enum in javascripttypescript get enum value from numbertypescript string enum to objectenum is angularenum typescript angular with namenew field enter in enum typescripttypescript for type in enumtypescript one of enum valuesnative enums typescript 28alias 29 enum role in angularinterface enum typescriptenums typescript exampletypescript typehint enumto enum or not to enum typescripttypescript key is enumtypescript enum to stringtypescript working with enumsuse enum value as key typescripttypescript string from enumtypescript get enum as object in type definition file 5ctype enum reacttypescript type enum to stringtypescript enum values as typeget enum property name typescript by variableenum in tstypescript method in enumtypescript how to convert enum values to stringtypescript enum value as object keywhy use typescript enumjs typescript enumtypescrpt enumenum field as enum field typescripttypescript enum to enum arraywhy we use enum in typescriptts get enumb value nameenum convention javascripttypescript enum c3 b9typescript add to enumwhere to declare enum in angularstring name enum typescripttype to enum typescripttypescript enum value from stringhow to typescript enum to a variable in javascriptenum number javascriptset enum typescriptes enum stringtypescript type string enum valuehow to access enum values tsaccess typesript enum using numberkeyof typeof enum typescripttypescript enum string valueuse object in enum typescriptcheck enum type in typescriptcasting as enum typescriptenum value object typescriptenums en typescripthow to use enums in ts exampleenum wit string values tstypescript enum to string typeenum string typescript usetypescript checking enumenum type validation typescripthow to get enum value with number on typescriptvalue from enum typescriptts get value of enumtypescript enum in interfacetypescript use enum as typetypescript enum examplestypescript named enumenum with typed values javascriptenum index typescriptacess enum typescript with a variablesetting an enum value in typescriptuse enum in typescripttypescript enum int to stringjs enum with valuesenums and set typescriptuse of enum typescriptmore then one value in the enum type in typescripthow to use enum in typescriptts enumstypescript enum 5d 5cangular turnerey enumtypescript enum that take values of other enumsenum string value typescriptvalue of enum typescripttypescript get enum string valuecreate a enum type in typescriptcreate enum angularhow to extract a particular type from an enum in typescriptget value from enum typescriptcreate enum in typescriptcan we change enum values in typescriptdefine enum with typescriptget value of enum in typescriptdefine an enum in typescripttypescript enumbhow make enum in typescriptenum as type in typescripttypescript set number enumtypescript enum orreact enum exampleenum union of enums typescripttypescript how to force enum valuetypescript enum as object typets set enum value as keydefine enums in typescriptconvert enum value to string typescriptjavascript enum with string valuetypescript enum in interfsread enum value in typescripthow to get alias or display name of enums in angular htmlenum example typescriptproperties as enum typescriptts interface enumenum to string typescripttypescript nested enumtypescript enum define typeincludes enum typescriptenumerate typescripttypescript values of enumtypescript enum set typehow to make enum to negative typescriptadd a string to enum typescriptdeclare enum type typescriptenum typescript get valuetypescript enum value to enumtypescript assign enum from stringusing enum typescriptangular define enumconst enum in typescriptenum example angularwhat type is enum typescripttypescript get type of enum valuemapping enum to object properties typescriptusing typescript enum in a typescript recordtypescript use enumtypescript return type string of enumget enum value from number typescriptdeclare enum tstypescript enum to steingconvert enum to string in typescripttypscript declare enumts enum typesenum with string typescriptdefine enum type in typescripttypescript type being enumtype script predefine return type of enumtypescript make enumhow to get enum value in typescriptcreate enum typescriptts get values from typescript enumtypescript enum values listobject values on enum typescriptts enum objectenum model in angularjavascript enum with valuestypescript valueof enuminterface as enum typescriptenum type javascripttypescript enum variable typetypescript declare variable of type enumdifference between enum and interface typescripttypescript enum with nullable valuesenum in reacttypescript type from enum values