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
Property 'alsoWorks' is missing in type 'C' but required in type 'I'.
3
3
fuzzy.ts(21,34): error TS2322: Type 'this' is not assignable to type 'I'.
4
4
Property 'alsoWorks' is missing in type 'C' but required in type 'I'.
5
-
fuzzy.ts(25,20): error TS2741: Property 'anything' is missing in type '{ oneI: this; }' but required in type 'R'.
5
+
fuzzy.ts(25,20): error TS2352: Conversion of type '{ oneI: this; }' to type 'R' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
6
+
Property 'anything' is missing in type '{ oneI: this; }' but required in type 'R'.
6
7
7
8
8
9
==== fuzzy.ts (3 errors) ====
@@ -41,7 +42,8 @@ fuzzy.ts(25,20): error TS2741: Property 'anything' is missing in type '{ oneI: t
41
42
worksToo():R {
42
43
return <R>({ oneI: this });
43
44
~~~~~~~~~~~~~~~~~~~
44
-
!!! error TS2741: Property 'anything' is missing in type '{ oneI: this; }' but required in type 'R'.
45
+
!!! error TS2352: Conversion of type '{ oneI: this; }' to type 'R' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
46
+
!!! error TS2352: Property 'anything' is missing in type '{ oneI: this; }' but required in type 'R'.
45
47
!!! related TS2728 fuzzy.ts:9:9: 'anything' is declared here.
Copy file name to clipboardExpand all lines: testdata/baselines/reference/submodule/compiler/genericTypeAssertions2.errors.txt
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ genericTypeAssertions2.ts(10,5): error TS2322: Type 'B<string>' is not assignabl
4
4
Types of parameters 'x' and 'x' are incompatible.
5
5
Type 'number' is not assignable to type 'string'.
6
6
genericTypeAssertions2.ts(11,5): error TS2741: Property 'bar' is missing in type 'A<number>' but required in type 'B<number>'.
7
-
genericTypeAssertions2.ts(13,21): error TS2741: Property 'foo' is missing in type 'undefined[]' but required in type 'A<number>'.
7
+
genericTypeAssertions2.ts(13,21): error TS2352: Conversion of type 'undefined[]' to type 'A<number>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
8
+
Property 'foo' is missing in type 'undefined[]' but required in type 'A<number>'.
8
9
9
10
10
11
==== genericTypeAssertions2.ts (3 errors) ====
@@ -31,5 +32,6 @@ genericTypeAssertions2.ts(13,21): error TS2741: Property 'foo' is missing in typ
31
32
var r4: A<number> = <A<number>>new A();
32
33
var r5: A<number> = <A<number>>[]; // error
33
34
~~~~~~~~~~~~~
34
-
!!! error TS2741: Property 'foo' is missing in type 'undefined[]' but required in type 'A<number>'.
35
+
!!! error TS2352: Conversion of type 'undefined[]' to type 'A<number>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
36
+
!!! error TS2352: Property 'foo' is missing in type 'undefined[]' but required in type 'A<number>'.
35
37
!!! related TS2728 genericTypeAssertions2.ts:1:14: 'foo' is declared here.
Copy file name to clipboardExpand all lines: testdata/baselines/reference/submodule/compiler/noImplicitAnyInCastExpression.errors.txt
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
noImplicitAnyInCastExpression.ts(15,2): error TS2739: Type '{ c: null; }' is missing the following properties from type 'IFoo': a, b
1
+
noImplicitAnyInCastExpression.ts(15,2): error TS2352: Conversion of type '{ c: null; }' to type 'IFoo' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
2
+
Type '{ c: null; }' is missing the following properties from type 'IFoo': a, b
@@ -18,4 +19,5 @@ noImplicitAnyInCastExpression.ts(15,2): error TS2739: Type '{ c: null; }' is mis
18
19
// Neither types is assignable to each other
19
20
(<IFoo>{ c: null });
20
21
~~~~~~~~~~~~~~~~~
21
-
!!! error TS2739: Type '{ c: null; }' is missing the following properties from type 'IFoo': a, b
22
+
!!! error TS2352: Conversion of type '{ c: null; }' to type 'IFoo' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
23
+
!!! error TS2352: Type '{ c: null; }' is missing the following properties from type 'IFoo': a, b
Copy file name to clipboardExpand all lines: testdata/baselines/reference/submodule/conformance/jsdocTypeTagCast.errors.txt
+22-14Lines changed: 22 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,12 @@
1
-
b.js(4,31): 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.
2
-
b.js(45,36): error TS2741: Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'.
3
-
b.js(49,42): error TS2739: Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x
4
-
b.js(51,38): error TS2741: Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'.
5
-
b.js(52,38): error TS2741: Property 'q' is missing in type 'SomeBase' but required in type 'SomeOther'.
1
+
b.js(4,20): 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.
2
+
b.js(45,23): error TS2352: Conversion of type 'SomeOther' to type 'SomeBase' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
3
+
Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'.
4
+
b.js(49,26): error TS2352: Conversion of type 'SomeOther' to type 'SomeDerived' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
5
+
Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x
6
+
b.js(51,24): error TS2352: Conversion of type 'SomeDerived' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
7
+
Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'.
8
+
b.js(52,24): error TS2352: Conversion of type 'SomeBase' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
9
+
Property 'q' is missing in type 'SomeBase' but required in type 'SomeOther'.
6
10
b.js(66,15): error TS1228: A type predicate is only allowed in return type position for functions and methods.
7
11
b.js(66,38): error TS2454: Variable 'numOrStr' is used before being assigned.
8
12
b.js(67,2): error TS2322: Type 'string | number' is not assignable to type 'string'.
@@ -18,7 +22,7 @@ b.js(67,8): error TS2454: Variable 'numOrStr' is used before being assigned.
18
22
var W = /** @type {string} */(/** @type {*} */ (4));
19
23
20
24
var W = /** @type {string} */(4); // Error
21
-
~
25
+
~~~~~~
22
26
!!! 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.
23
27
24
28
/** @type {*} */
@@ -61,23 +65,27 @@ b.js(67,8): error TS2454: Variable 'numOrStr' is used before being assigned.
!!! error TS2741: Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'.
68
+
~~~~~~~~
69
+
!!! error TS2352: Conversion of type 'SomeOther' to type 'SomeBase' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
70
+
!!! error TS2352: Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'.
66
71
!!! related TS2728 b.js:17:9: 'p' is declared here.
!!! error TS2739: Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x
76
+
~~~~~~~~~~~
77
+
!!! error TS2352: Conversion of type 'SomeOther' to type 'SomeDerived' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
78
+
!!! error TS2352: Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x
!!! error TS2741: Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'.
81
+
~~~~~~~~~
82
+
!!! error TS2352: Conversion of type 'SomeDerived' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
83
+
!!! error TS2352: Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'.
77
84
!!! related TS2728 b.js:28:9: 'q' is declared here.
!!! error TS2741: Property 'q' is missing in type 'SomeBase' but required in type 'SomeOther'.
86
+
~~~~~~~~~
87
+
!!! error TS2352: Conversion of type 'SomeBase' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
88
+
!!! error TS2352: Property 'q' is missing in type 'SomeBase' but required in type 'SomeOther'.
81
89
!!! related TS2728 b.js:28:9: 'q' is declared here.
Copy file name to clipboardExpand all lines: testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithPrivates3.errors.txt
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
objectTypesIdentityWithPrivates3.ts(25,1): error TS2741: Property 'y' is missing in type 'C3<T2>' but required in type 'C4'.
1
+
objectTypesIdentityWithPrivates3.ts(25,1): error TS2352: Conversion of type 'C3<T2>' to type 'C4' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
2
+
Property 'y' is missing in type 'C3<T2>' but required in type 'C4'.
<C4>c3; // Should fail (private x originates in the same declaration, but different types)
30
31
~~~~~~
31
-
!!! error TS2741: Property 'y' is missing in type 'C3<T2>' but required in type 'C4'.
32
+
!!! error TS2352: Conversion of type 'C3<T2>' to type 'C4' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
33
+
!!! error TS2352: Property 'y' is missing in type 'C3<T2>' but required in type 'C4'.
32
34
!!! related TS2728 objectTypesIdentityWithPrivates3.ts:21:5: 'y' is declared here.
0 commit comments