Anonymous function breaks discriminated intersection type narrowing #9929
Labels
Breaking Change
Would introduce errors in existing code
Duplicate
An existing issue was already created
TypeScript Version:
2.0.0
Code
Expected behavior:
action
should be narrowed to theControllerSelectAction
class in the anonymous function in theCONTROLLER_SELECT
case, so that no error is thrown when accessingaction.payload.id
.Actual behavior:
The following error is thrown:
The text was updated successfully, but these errors were encountered: