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
Distributive conditional types can't distribute over NoInfer types wrapping a union #61076
typeFooEvent={type: "FOO"};typeBarEvent={type: "BAR"};typeInput=FooEvent|BarEvent;typeResult=Extract<Input,FooEvent>;// ^? type Result = { type: "FOO"; }typeResult2=Extract<NoInfer<Input>,FooEvent>;// ^? type Result2 = never
🙁 Actual behavior
Result2 gets computed as never
🙂 Expected behavior
Result2 should get computed as { type: "FOO"; }
Additional information about the issue
This is repro for the core problem behind this incorrect behavior: TS playground
Activity