@@ -5,8 +5,10 @@ tests/cases/compiler/inKeywordTypeguard.ts(16,11): error TS2339: Property 'a' do
5
5
tests/cases/compiler/inKeywordTypeguard.ts(27,11): error TS2339: Property 'b' does not exist on type 'AWithOptionalProp | BWithOptionalProp'.
6
6
Property 'b' does not exist on type 'AWithOptionalProp'.
7
7
tests/cases/compiler/inKeywordTypeguard.ts(42,11): error TS2339: Property 'b' does not exist on type 'AWithMethod'.
8
- tests/cases/compiler/inKeywordTypeguard.ts(49,11): error TS2339: Property 'a' does not exist on type 'never'.
9
- tests/cases/compiler/inKeywordTypeguard.ts(50,11): error TS2339: Property 'b' does not exist on type 'never'.
8
+ tests/cases/compiler/inKeywordTypeguard.ts(49,11): error TS2339: Property 'a' does not exist on type '(AWithMethod & { c: unknown; }) | (BWithMethod & { c: unknown; })'.
9
+ Property 'a' does not exist on type 'BWithMethod & { c: unknown; }'.
10
+ tests/cases/compiler/inKeywordTypeguard.ts(50,11): error TS2339: Property 'b' does not exist on type '(AWithMethod & { c: unknown; }) | (BWithMethod & { c: unknown; })'.
11
+ Property 'b' does not exist on type 'AWithMethod & { c: unknown; }'.
10
12
tests/cases/compiler/inKeywordTypeguard.ts(52,11): error TS2339: Property 'a' does not exist on type 'AWithMethod | BWithMethod'.
11
13
Property 'a' does not exist on type 'BWithMethod'.
12
14
tests/cases/compiler/inKeywordTypeguard.ts(53,11): error TS2339: Property 'b' does not exist on type 'AWithMethod | BWithMethod'.
@@ -85,10 +87,12 @@ tests/cases/compiler/inKeywordTypeguard.ts(94,26): error TS2339: Property 'a' do
85
87
if ("c" in x) {
86
88
x.a();
87
89
~
88
- !!! error TS2339: Property 'a' does not exist on type 'never'.
90
+ !!! error TS2339: Property 'a' does not exist on type '(AWithMethod & { c: unknown; }) | (BWithMethod & { c: unknown; })'.
91
+ !!! error TS2339: Property 'a' does not exist on type 'BWithMethod & { c: unknown; }'.
89
92
x.b();
90
93
~
91
- !!! error TS2339: Property 'b' does not exist on type 'never'.
94
+ !!! error TS2339: Property 'b' does not exist on type '(AWithMethod & { c: unknown; }) | (BWithMethod & { c: unknown; })'.
95
+ !!! error TS2339: Property 'b' does not exist on type 'AWithMethod & { c: unknown; }'.
92
96
} else {
93
97
x.a();
94
98
~
0 commit comments