-
Notifications
You must be signed in to change notification settings - Fork 13.4k
iterating an enum is now an error #33123
Copy link
Copy link
Closed
Labels
RescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestoneWorking as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Milestone
Metadata
Metadata
Assignees
Labels
RescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestoneWorking as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Iterating a string enum in strict mode is not allowed since 3.6.2. Is this a breaking change or a bug?
Sample code:
tsc --strict sample.tsTSC 3.5.2: Compiles OK
TSC 3.6.2: reports an error:
error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'typeof DAYS'.