[TS2.5 regression] Object.values(someEnum) returns string[] (not any[]/number[]) #21089
Labels
Bug
A bug in TypeScript
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Fixed
A PR has been merged for this issue
Milestone
TypeScript Version: 2.7.0-dev.201xxxxx
Code
Expected behavior:
In TS2.5, this used to compile, because
xs
wasany[]
.Actual behavior:
In TS2.6+,
xs
isstring[]
. That's wrong:Related:
Curiously, this only happens for enums.
{[k: ...}: V}
style objects work fine.The text was updated successfully, but these errors were encountered: