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: src/compiler/diagnosticMessages.json
+6-2
Original file line number
Diff line number
Diff line change
@@ -1196,7 +1196,7 @@
1196
1196
"category": "Error",
1197
1197
"code": 2351
1198
1198
},
1199
-
"Type '{0}' cannot be converted to type '{1}'.": {
1199
+
"Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.": {
1200
1200
"category": "Error",
1201
1201
"code": 2352
1202
1202
},
@@ -2421,10 +2421,14 @@
2421
2421
"category": "Error",
2422
2422
"code": 2730
2423
2423
},
2424
-
"Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension": {
2424
+
"Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.": {
2425
2425
"category": "Error",
2426
2426
"code": 2731
2427
2427
},
2428
+
"Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension": {
2429
+
"category": "Error",
2430
+
"code": 2732
2431
+
},
2428
2432
2429
2433
"Import declaration '{0}' is using private name '{1}'.": {
Copy file name to clipboardExpand all lines: tests/baselines/reference/arrayCast.errors.txt
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
tests/cases/compiler/arrayCast.ts(3,23): error TS2352: Type '{ foo: string; }[]' cannot be converted to type '{ id: number; }[]'.
1
+
tests/cases/compiler/arrayCast.ts(3,23): error TS2352: Conversion of type '{ foo: string; }[]' to type '{ id: number; }[]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
2
2
Type '{ foo: string; }' is not comparable to type '{ id: number; }'.
3
3
Object literal may only specify known properties, and 'foo' does not exist in type '{ id: number; }'.
// has type { foo: string }[], which is not assignable to { id: number }[].
9
9
<{ id: number; }[]>[{ foo: "s" }];
10
10
~~~~~~~~
11
-
!!! error TS2352: Type '{ foo: string; }[]' cannot be converted to type '{ id: number; }[]'.
11
+
!!! error TS2352: Conversion of type '{ foo: string; }[]' to type '{ id: number; }[]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
12
12
!!! error TS2352: Type '{ foo: string; }' is not comparable to type '{ id: number; }'.
13
13
!!! error TS2352: Object literal may only specify known properties, and 'foo' does not exist in type '{ id: number; }'.
tests/cases/conformance/expressions/asOperator/asOperator2.ts(1,9): error TS2352: Type 'number' cannot be converted to type 'string'.
1
+
tests/cases/conformance/expressions/asOperator/asOperator2.ts(1,9): error TS2352: Conversion of type 'number' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
!!! error TS2352: Type 'number' cannot be converted to type 'string'.
7
+
!!! error TS2352: Conversion of type 'number' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts(2,9): error TS2352: Type '(v: number) => number' cannot be converted to type '(x: number) => string'.
1
+
tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts(2,9): error TS2352: Conversion of type '(v: number) => number' to type '(x: number) => string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
!!! error TS2352: Type '(v: number) => number' cannot be converted to type '(x: number) => string'.
9
+
!!! error TS2352: Conversion of type '(v: number) => number' to type '(x: number) => string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
10
10
!!! error TS2352: Type 'number' is not comparable to type 'string'.
tests/cases/conformance/expressions/asOperator/asOperatorNames.ts(2,9): error TS2352: Type 'number' cannot be converted to type 'string'.
1
+
tests/cases/conformance/expressions/asOperator/asOperatorNames.ts(2,9): error TS2352: Conversion of type 'number' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
!!! error TS2352: Type 'number' cannot be converted to type 'string'.
8
+
!!! error TS2352: Conversion of type 'number' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
0 commit comments