Narrowing via assignment in switch broken by #35000 #35070
Labels
Bug
A bug in TypeScript
Domain: Control Flow
The issue relates to control flow analysis
Fix Available
A PR has been opened for this issue
Milestone
#35000 breaks activex-scripting on Definitely Typed because narrowing via assignment in switch no longer works:
Actual behavior:
No error on
k === 'c'
and error ono[k]
.Using
if (k === 'c') {
instead ofswitch (k) { case 'c':
works correctly.The text was updated successfully, but these errors were encountered: