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
Copy file name to clipboardExpand all lines: tests/baselines/reference/inKeywordTypeguard.errors.txt
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -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 & Record<"c", unknown>) | (BWithMethod & Record<"c", unknown>)'.
9
+
Property 'a' does not exist on type 'BWithMethod & Record<"c", unknown>'.
10
+
tests/cases/compiler/inKeywordTypeguard.ts(50,11): error TS2339: Property 'b' does not exist on type '(AWithMethod & Record<"c", unknown>) | (BWithMethod & Record<"c", unknown>)'.
11
+
Property 'b' does not exist on type 'AWithMethod & Record<"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 & Record<"c", unknown>) | (BWithMethod & Record<"c", unknown>)'.
91
+
!!! error TS2339: Property 'a' does not exist on type 'BWithMethod & Record<"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 & Record<"c", unknown>) | (BWithMethod & Record<"c", unknown>)'.
95
+
!!! error TS2339: Property 'b' does not exist on type 'AWithMethod & Record<"c", unknown>'.
0 commit comments