You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Union discrimination breaks when destructuring parameters #38020
Expected behavior:
Typescript recognises that the type of the action has been checked and that the action has been refined to a specific one where the payload properties can be safely accessed.
Actual behavior:
Typescript does not refine the type and it errors saying that the action could be any of the payloads specified in the union type.
Activity
MartinJohns commentedon Apr 17, 2020
Duplicate of #12184.