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
tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts(8,5): error TS2322: Type '{ test: string; arg: A; }' is not assignable to type 'Something<A>'.
2
-
Type '{ test: string; arg: A; }' is not assignable to type 'A extends object ? { arg: A; } : { arg?: undefined; }'.
3
-
tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts(9,5): error TS2322: Type '{ test: string; arg: A; arr: A; }' is not assignable to type 'Something<A>'.
4
-
Type '{ test: string; arg: A; arr: A; }' is not assignable to type 'A extends object ? { arg: A; } : { arg?: undefined; }'.
1
+
tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts(8,5): error TS2322: Type '{ test: string; arg: object; }' is not assignable to type 'Something<A>'.
2
+
Type '{ test: string; arg: object; }' is not assignable to type 'A extends object ? { arg: A; } : { arg?: undefined; }'.
3
+
tests/cases/conformance/types/conditional/conditionalTypesExcessProperties.ts(9,5): error TS2322: Type '{ test: string; arg: object; arr: A; }' is not assignable to type 'Something<A>'.
4
+
Type '{ test: string; arg: object; arr: A; }' is not assignable to type 'A extends object ? { arg: A; } : { arg?: undefined; }'.
tests/cases/compiler/crashInGetTextOfComputedPropertyName.ts(23,24): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
Copy file name to clipboardExpand all lines: tests/baselines/reference/genericUnboundedTypeParamAssignability.errors.txt
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
tests/cases/compiler/genericUnboundedTypeParamAssignability.ts(2,5): error TS2339: Property 'toString' does not exist on type 'T'.
2
-
tests/cases/compiler/genericUnboundedTypeParamAssignability.ts(15,6): error TS2345: Argument of type 'T' is not assignable to parameter of type '{}'.
2
+
tests/cases/compiler/genericUnboundedTypeParamAssignability.ts(15,6): error TS2345: Argument of type 'unknown' is not assignable to parameter of type '{}'.
3
3
tests/cases/compiler/genericUnboundedTypeParamAssignability.ts(16,6): error TS2345: Argument of type 'T' is not assignable to parameter of type 'Record<string, any>'.
4
4
tests/cases/compiler/genericUnboundedTypeParamAssignability.ts(17,5): error TS2339: Property 'toString' does not exist on type 'T'.
f2(t); // error in strict, unbounded T doesn't satisfy the constraint
25
25
~
26
-
!!! error TS2345: Argument of type 'T' is not assignable to parameter of type '{}'.
27
-
!!! related TS2208 tests/cases/compiler/genericUnboundedTypeParamAssignability.ts:13:15: This type parameter probably needs an `extends object` constraint.
26
+
!!! error TS2345: Argument of type 'unknown' is not assignable to parameter of type '{}'.
28
27
f3(t); // error in strict, unbounded T doesn't satisfy the constraint
29
28
~
30
29
!!! error TS2345: Argument of type 'T' is not assignable to parameter of type 'Record<string, any>'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/keyofAndIndexedAccess.errors.txt
+16-40Lines changed: 16 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,11 @@
1
-
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(316,5): error TS2322: Type 'T' is not assignable to type '{}'.
2
-
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(317,5): error TS2322: Type 'T[keyof T]' is not assignable to type '{}'.
3
-
Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'.
4
-
Type 'T[string]' is not assignable to type '{}'.
5
-
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(318,5): error TS2322: Type 'T[K]' is not assignable to type '{}'.
6
-
Type 'T[keyof T]' is not assignable to type '{}'.
7
-
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(323,5): error TS2322: Type 'T' is not assignable to type '{} | null | undefined'.
8
-
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(324,5): error TS2322: Type 'T[keyof T]' is not assignable to type '{} | null | undefined'.
9
-
Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{} | null | undefined'.
10
-
Type 'T[string]' is not assignable to type '{} | null | undefined'.
11
-
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(325,5): error TS2322: Type 'T[K]' is not assignable to type '{} | null | undefined'.
12
-
Type 'T[keyof T]' is not assignable to type '{} | null | undefined'.
13
-
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(611,33): error TS2345: Argument of type 'T[K]' is not assignable to parameter of type '{} | null | undefined'.
14
-
Type 'T[keyof T]' is not assignable to type '{} | null | undefined'.
15
-
Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{} | null | undefined'.
16
-
Type 'T[string]' is not assignable to type '{} | null | undefined'.
17
-
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(619,13): error TS2322: Type 'T[keyof T]' is not assignable to type '{} | null | undefined'.
18
-
Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{} | null | undefined'.
19
-
Type 'T[string]' is not assignable to type '{} | null | undefined'.
1
+
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(316,5): error TS2322: Type 'unknown' is not assignable to type '{}'.
2
+
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(317,5): error TS2322: Type 'unknown' is not assignable to type '{}'.
3
+
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(318,5): error TS2322: Type 'unknown' is not assignable to type '{}'.
4
+
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(323,5): error TS2322: Type 'unknown' is not assignable to type '{} | null | undefined'.
5
+
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(324,5): error TS2322: Type 'unknown' is not assignable to type '{} | null | undefined'.
6
+
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(325,5): error TS2322: Type 'unknown' is not assignable to type '{} | null | undefined'.
7
+
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(611,33): error TS2345: Argument of type 'unknown' is not assignable to parameter of type '{} | null | undefined'.
8
+
tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts(619,13): error TS2322: Type 'unknown' is not assignable to type '{} | null | undefined'.
!!! error TS2322: Type 'T' is not assignable to type '{}'.
341
-
!!! related TS2208 tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts:314:14: This type parameter probably needs an `extends object` constraint.
329
+
!!! error TS2322: Type 'unknown' is not assignable to type '{}'.
342
330
a = y;
343
331
~
344
-
!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{}'.
345
-
!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'.
346
-
!!! error TS2322: Type 'T[string]' is not assignable to type '{}'.
332
+
!!! error TS2322: Type 'unknown' is not assignable to type '{}'.
347
333
a = z;
348
334
~
349
-
!!! error TS2322: Type 'T[K]' is not assignable to type '{}'.
350
-
!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{}'.
335
+
!!! error TS2322: Type 'unknown' is not assignable to type '{}'.
351
336
}
352
337
353
338
function f92<T, K extends keyof T>(x: T, y: T[keyof T], z: T[K]) {
354
339
let a: {} | null | undefined;
355
340
a = x;
356
341
~
357
-
!!! error TS2322: Type 'T' is not assignable to type '{} | null | undefined'.
358
-
!!! related TS2208 tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts:321:14: This type parameter probably needs an `extends object` constraint.
342
+
!!! error TS2322: Type 'unknown' is not assignable to type '{} | null | undefined'.
359
343
a = y;
360
344
~
361
-
!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{} | null | undefined'.
362
-
!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{} | null | undefined'.
363
-
!!! error TS2322: Type 'T[string]' is not assignable to type '{} | null | undefined'.
345
+
!!! error TS2322: Type 'unknown' is not assignable to type '{} | null | undefined'.
364
346
a = z;
365
347
~
366
-
!!! error TS2322: Type 'T[K]' is not assignable to type '{} | null | undefined'.
367
-
!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{} | null | undefined'.
348
+
!!! error TS2322: Type 'unknown' is not assignable to type '{} | null | undefined'.
0 commit comments