We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01ee1b9 commit d832fbfCopy full SHA for d832fbf
tests/cases/conformance/types/conditional/conditionalTypes2.ts
@@ -147,3 +147,12 @@ type B2<T, V> =
147
148
type C2<T, V, E> =
149
T extends object ? { [Q in keyof T]: C2<T[Q], V, E>; } : T;
150
+
151
+// Repro from #28654
152
153
+type MaybeTrue<T extends { b: boolean }> = true extends T["b"] ? "yes" : "no";
154
155
+type T0 = MaybeTrue<{ b: never }> // "no"
156
+type T1 = MaybeTrue<{ b: false }>; // "no"
157
+type T2 = MaybeTrue<{ b: true }>; // "yes"
158
+type T3 = MaybeTrue<{ b: boolean }>; // "yes"
0 commit comments