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 93acaac commit 3e93461Copy full SHA for 3e93461
tests/cases/compiler/discriminantPropertyCheck.ts
@@ -99,3 +99,25 @@ function func2(inst: Instance) {
99
}
100
101
102
+
103
+// Repro from #29106
104
105
+const f = (_a: string, _b: string): void => {};
106
107
+interface A {
108
+ a?: string;
109
+ b?: string;
110
+}
111
112
+interface B {
113
+ a: string;
114
+ b: string;
115
116
117
+type U = A | B;
118
119
+const u: U = {} as any;
120
121
+u.a && u.b && f(u.a, u.b);
122
123
+u.b && u.a && f(u.a, u.b);
0 commit comments