enum Direction {
North = "NORTH",
South = "SOUTH",
East = "EAST",
West = "WEST"
}
console.log(Object.values(Direction)); // NORTH,SOUTH,EAST,WEST
enums.ts:10:20 - error TS2550: Property 'values' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2017' or later.
10 console.log(Object.values(Direction)); // NORTH,SOUTH,EAST,WEST
~~~~~~
So can anyone explain what is the deal here?
Are we not recommending modern JavaScript API's? What is in fact the recommended tsconfig.json as of now ? I am very confused but also, I want to understand.
I am getting errors when doing stuff like
So can anyone explain what is the deal here? Are we not recommending modern JavaScript API's? What is in fact the recommended
tsconfig.json
as of now ? I am very confused but also, I want to understand.