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
Type '() => number' is not assignable to type '() => string'.
4
4
Type 'number' is not assignable to type 'string'.
5
5
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(8,1): error TS2322: Type 'Object' is not assignable to type 'I'.
6
-
Types of property 'toString' are incompatible.
7
-
Type '() => string' is not assignable to type '() => number'.
8
-
Type 'string' is not assignable to type 'number'.
6
+
The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
7
+
Types of property 'toString' are incompatible.
8
+
Type '() => string' is not assignable to type '() => number'.
9
+
Type 'string' is not assignable to type 'number'.
9
10
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(14,1): error TS2322: Type 'C' is not assignable to type 'Object'.
10
11
Types of property 'toString' are incompatible.
11
12
Type '() => number' is not assignable to type '() => string'.
12
13
Type 'number' is not assignable to type 'string'.
13
14
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(15,1): error TS2322: Type 'Object' is not assignable to type 'C'.
14
-
Types of property 'toString' are incompatible.
15
-
Type '() => string' is not assignable to type '() => number'.
16
-
Type 'string' is not assignable to type 'number'.
15
+
The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
16
+
Types of property 'toString' are incompatible.
17
+
Type '() => string' is not assignable to type '() => number'.
18
+
Type 'string' is not assignable to type 'number'.
17
19
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(20,1): error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object'.
18
20
Types of property 'toString' are incompatible.
19
21
Type '() => void' is not assignable to type '() => string'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts(8,1): error TS2322: Type 'Object' is not assignable to type 'I'.
2
-
Type 'Object' provides no match for the signature '(): void'
2
+
The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
3
+
Type 'Object' provides no match for the signature '(): void'
3
4
tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts(14,1): error TS2322: Type 'Object' is not assignable to type '() => void'.
4
-
Type 'Object' provides no match for the signature '(): void'
5
+
The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
6
+
Type 'Object' provides no match for the signature '(): void'
0 commit comments