mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 22:51:17 -05:00
Removed colons from diagnostic messages.
Also got rid of the 'terminalMessages' concept.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2429: Interface 'Bar' incorrectly extends interface 'Foo':
|
||||
Types of property 'f' are incompatible:
|
||||
tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2430: Interface 'Bar' incorrectly extends interface 'Foo'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(key: string) => string' is not assignable to type '() => string'.
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2429: Int
|
||||
|
||||
interface Bar extends Foo {
|
||||
~~~
|
||||
!!! error TS2429: Interface 'Bar' incorrectly extends interface 'Foo':
|
||||
!!! error TS2429: Types of property 'f' are incompatible:
|
||||
!!! error TS2429: Type '(key: string) => string' is not assignable to type '() => string'.
|
||||
!!! error TS2430: Interface 'Bar' incorrectly extends interface 'Foo'.
|
||||
!!! error TS2430: Types of property 'f' are incompatible.
|
||||
!!! error TS2430: Type '(key: string) => string' is not assignable to type '() => string'.
|
||||
f(key: string): string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"':
|
||||
tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2323: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
|
||||
Property 'someClass' is missing in type 'Number'.
|
||||
tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2323: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
|
||||
|
||||
@@ -8,8 +8,8 @@ tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2323: Type 'typeof "tes
|
||||
var x = moduleA;
|
||||
x = 1; // Should be error
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"':
|
||||
!!! error TS2322: Property 'someClass' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
|
||||
!!! error TS2323: Property 'someClass' is missing in type 'Number'.
|
||||
var y = 1;
|
||||
y = moduleA; // should be error
|
||||
~
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts(9,7): error TS2416: Class 'Derived<U>' incorrectly extends base class 'Base<string>':
|
||||
Types of property 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts(9,7): error TS2415: Class 'Derived<U>' incorrectly extends base class 'Base<string>'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'String' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtypi
|
||||
// is String (S) a subtype of U extends String (T)? Would only be true if we used the apparent type of U (T)
|
||||
class Derived<U> extends Base<string> { // error
|
||||
~~~~~~~
|
||||
!!! error TS2416: Class 'Derived<U>' incorrectly extends base class 'Base<string>':
|
||||
!!! error TS2416: Types of property 'x' are incompatible:
|
||||
!!! error TS2416: Type 'String' is not assignable to type 'string'.
|
||||
!!! error TS2415: Class 'Derived<U>' incorrectly extends base class 'Base<string>'.
|
||||
!!! error TS2415: Types of property 'x' are incompatible.
|
||||
!!! error TS2415: Type 'String' is not assignable to type 'string'.
|
||||
x: String;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts(9,7): error TS2416: Class 'Derived<U>' incorrectly extends base class 'Base':
|
||||
Types of property 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts(9,7): error TS2415: Class 'Derived<U>' incorrectly extends base class 'Base'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'U' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSuperty
|
||||
// is String (S) a subtype of U extends String (T)? Would only be true if we used the apparent type of U (T)
|
||||
class Derived<U extends String> extends Base { // error
|
||||
~~~~~~~
|
||||
!!! error TS2416: Class 'Derived<U>' incorrectly extends base class 'Base':
|
||||
!!! error TS2416: Types of property 'x' are incompatible:
|
||||
!!! error TS2416: Type 'U' is not assignable to type 'string'.
|
||||
!!! error TS2415: Class 'Derived<U>' incorrectly extends base class 'Base'.
|
||||
!!! error TS2415: Types of property 'x' are incompatible.
|
||||
!!! error TS2415: Type 'U' is not assignable to type 'string'.
|
||||
x: U;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments':
|
||||
tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2323: Type 'number' is not assignable to type 'IArguments'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@ tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS
|
||||
function foo(a) {
|
||||
arguments = 10; /// This shouldnt be of type number and result in error.
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'IArguments':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'IArguments'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
}
|
||||
@@ -1,49 +1,49 @@
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2322: Type 'undefined[]' is not assignable to type 'I1':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2323: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
Property 'IM1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2322: Type 'undefined[]' is not assignable to type 'C1':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2323: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
Property 'IM1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2322: Type 'undefined[]' is not assignable to type 'C2':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2323: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2322: Type 'undefined[]' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2323: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(60,1): error TS2322: Type 'C3[]' is not assignable to type 'I1[]':
|
||||
Type 'C3' is not assignable to type 'I1':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(60,1): error TS2323: Type 'C3[]' is not assignable to type 'I1[]'.
|
||||
Type 'C3' is not assignable to type 'I1'.
|
||||
Property 'IM1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(64,1): error TS2322: Type 'I1[]' is not assignable to type 'C1[]':
|
||||
Type 'I1' is not assignable to type 'C1':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(64,1): error TS2323: Type 'I1[]' is not assignable to type 'C1[]'.
|
||||
Type 'I1' is not assignable to type 'C1'.
|
||||
Property 'C1M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(65,1): error TS2322: Type 'C3[]' is not assignable to type 'C1[]':
|
||||
Type 'C3' is not assignable to type 'C1':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(65,1): error TS2323: Type 'C3[]' is not assignable to type 'C1[]'.
|
||||
Type 'C3' is not assignable to type 'C1'.
|
||||
Property 'IM1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(68,1): error TS2322: Type 'C1[]' is not assignable to type 'C2[]':
|
||||
Type 'C1' is not assignable to type 'C2':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(68,1): error TS2323: Type 'C1[]' is not assignable to type 'C2[]'.
|
||||
Type 'C1' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(69,1): error TS2322: Type 'I1[]' is not assignable to type 'C2[]':
|
||||
Type 'I1' is not assignable to type 'C2':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(69,1): error TS2323: Type 'I1[]' is not assignable to type 'C2[]'.
|
||||
Type 'I1' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is not assignable to type 'C2[]':
|
||||
Type 'C3' is not assignable to type 'C2':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2323: Type 'C3[]' is not assignable to type 'C2[]'.
|
||||
Type 'C3' is not assignable to type 'C2'.
|
||||
Property 'C2M1' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(75,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]':
|
||||
Type 'C2' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(75,1): error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
Type 'C2' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(76,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]':
|
||||
Type 'C1' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(76,1): error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
Type 'C1' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(77,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]':
|
||||
Type 'I1' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(77,1): error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
Type 'I1' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type '{ one: number; }'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(82,1): error TS2322: Type 'C1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(82,1): error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2322: Type 'C2' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'I1'.
|
||||
|
||||
|
||||
@@ -95,20 +95,20 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is n
|
||||
|
||||
var i1_error: I1 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'I1':
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'.
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'I1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'undefined[]'.
|
||||
var c1_error: C1 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C1':
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'.
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'undefined[]'.
|
||||
var c2_error: C2 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'undefined[]'.
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'undefined[]'.
|
||||
var c3_error: C3 = []; // should be an error - is
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'undefined[]' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
!!! error TS2323: Type 'undefined[]' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'undefined[]'.
|
||||
|
||||
|
||||
arr_any = arr_i1; // should be ok - is
|
||||
@@ -121,81 +121,81 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is n
|
||||
arr_i1 = arr_c2; // should be ok - subtype relationship - is
|
||||
arr_i1 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C3[]' is not assignable to type 'I1[]':
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'I1':
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3[]' is not assignable to type 'I1[]'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'I1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'C3'.
|
||||
|
||||
arr_c1 = arr_c1; // should be ok - subtype relationship - is
|
||||
arr_c1 = arr_c2; // should be ok - subtype relationship - is
|
||||
arr_c1 = arr_i1; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C1[]':
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C1':
|
||||
!!! error TS2322: Property 'C1M1' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C1[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C1'.
|
||||
!!! error TS2323: Property 'C1M1' is missing in type 'I1'.
|
||||
arr_c1 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C3[]' is not assignable to type 'C1[]':
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'C1':
|
||||
!!! error TS2322: Property 'IM1' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3[]' is not assignable to type 'C1[]'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'C1'.
|
||||
!!! error TS2323: Property 'IM1' is missing in type 'C3'.
|
||||
|
||||
arr_c2 = arr_c2; // should be ok - subtype relationship - is
|
||||
arr_c2 = arr_c1; // should be an error - subtype relationship - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C1[]' is not assignable to type 'C2[]':
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'C1'.
|
||||
!!! error TS2323: Type 'C1[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'C1'.
|
||||
arr_c2 = arr_i1; // should be an error - subtype relationship - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C2[]':
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'I1'.
|
||||
arr_c2 = arr_c3; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C3[]' is not assignable to type 'C2[]':
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'C2M1' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3[]' is not assignable to type 'C2[]'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'C2M1' is missing in type 'C3'.
|
||||
|
||||
// "clean up bug" occurs at this point
|
||||
// if you move these three expressions to another file, they raise an error
|
||||
// something to do with state from the above propagating forward?
|
||||
arr_c3 = arr_c2_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'C2'.
|
||||
!!! error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'C2'.
|
||||
arr_c3 = arr_c1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'C1'.
|
||||
!!! error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'C1'.
|
||||
arr_c3 = arr_i1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'I1'.
|
||||
|
||||
arr_any = f1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '() => C1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'push' is missing in type '() => C1'.
|
||||
!!! error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => C1'.
|
||||
arr_any = o1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type '{ one: number; }'.
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type '{ one: number; }'.
|
||||
arr_any = a1; // should be ok - is
|
||||
arr_any = c1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C1'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C1'.
|
||||
arr_any = c2; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C2'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C2'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
arr_any = i1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'I1'.
|
||||
@@ -1,25 +1,25 @@
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(47,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]':
|
||||
Type 'C2' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(47,1): error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
Type 'C2' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(48,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]':
|
||||
Type 'C1' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(48,1): error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
Type 'C1' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(49,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]':
|
||||
Type 'I1' is not assignable to type 'C3':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(49,1): error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
Type 'I1' is not assignable to type 'C3'.
|
||||
Property 'CM3M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2322: Type '() => C1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2322: Type '() => any' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => any'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type '{ one: number; }'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(55,1): error TS2322: Type 'C1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(55,1): error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C1'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2322: Type 'C2' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C2'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C3'.
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2322: Type 'I1' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'I1'.
|
||||
|
||||
|
||||
@@ -72,47 +72,47 @@ tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2322: Type 'I1' is n
|
||||
// "clean up error" occurs at this point
|
||||
arr_c3 = arr_c2_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'C2'.
|
||||
!!! error TS2323: Type 'C2[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'C2'.
|
||||
arr_c3 = arr_c1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'C1'.
|
||||
!!! error TS2323: Type 'C1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'C1'.
|
||||
arr_c3 = arr_i1_2; // should be an error - is
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]':
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'C3':
|
||||
!!! error TS2322: Property 'CM3M1' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1[]' is not assignable to type 'C3[]'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'C3'.
|
||||
!!! error TS2323: Property 'CM3M1' is missing in type 'I1'.
|
||||
|
||||
arr_any = f1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '() => C1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'push' is missing in type '() => C1'.
|
||||
!!! error TS2323: Type '() => C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => C1'.
|
||||
arr_any = function () { return null;} // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '() => any' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'push' is missing in type '() => any'.
|
||||
!!! error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => any'.
|
||||
arr_any = o1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type '{ one: number; }'.
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type '{ one: number; }'.
|
||||
arr_any = a1; // should be ok - is
|
||||
arr_any = c1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C1'.
|
||||
!!! error TS2323: Type 'C1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C1'.
|
||||
arr_any = c2; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C2'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C2'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
arr_any = i1; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'I1' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'I1'.
|
||||
!!! error TS2323: Type 'I1' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'I1'.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(24,1): error TS2322: Type '() => any' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(24,1): error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type '() => any'.
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'C3'.
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ tests/cases/compiler/arrayAssignmentTest4.ts(25,1): error TS2322: Type 'C3' is n
|
||||
|
||||
arr_any = function () { return null;} // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '() => any' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'push' is missing in type '() => any'.
|
||||
!!! error TS2323: Type '() => any' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type '() => any'.
|
||||
arr_any = c3; // should be an error - is
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'C3' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'C3'.
|
||||
!!! error TS2323: Type 'C3' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'C3'.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]':
|
||||
Type 'IToken' is not assignable to type 'IStateToken':
|
||||
tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2323: Type 'IToken[]' is not assignable to type 'IStateToken[]'.
|
||||
Type 'IToken' is not assignable to type 'IStateToken'.
|
||||
Property 'state' is missing in type 'IToken'.
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[
|
||||
var lineTokens:ILineTokens= this.tokenize(line, state, true);
|
||||
var tokens:IStateToken[]= lineTokens.tokens;
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]':
|
||||
!!! error TS2322: Type 'IToken' is not assignable to type 'IStateToken':
|
||||
!!! error TS2322: Property 'state' is missing in type 'IToken'.
|
||||
!!! error TS2323: Type 'IToken[]' is not assignable to type 'IStateToken[]'.
|
||||
!!! error TS2323: Type 'IToken' is not assignable to type 'IStateToken'.
|
||||
!!! error TS2323: Property 'state' is missing in type 'IToken'.
|
||||
if (tokens.length === 0) {
|
||||
return this.onEnter(line, tokens, offset); // <== this should produce an error since onEnter can not be called with (string, IStateToken[], offset)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/arrayCast.ts(3,1): error TS2353: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other:
|
||||
Type '{ foo: string; }' is not assignable to type '{ id: number; }':
|
||||
tests/cases/compiler/arrayCast.ts(3,1): error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other.
|
||||
Type '{ foo: string; }' is not assignable to type '{ id: number; }'.
|
||||
Property 'id' is missing in type '{ foo: string; }'.
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ tests/cases/compiler/arrayCast.ts(3,1): error TS2353: Neither type '{ foo: strin
|
||||
// has type { foo: string }[], which is not assignable to { id: number }[].
|
||||
<{ id: number; }[]>[{ foo: "s" }];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other:
|
||||
!!! error TS2353: Type '{ foo: string; }' is not assignable to type '{ id: number; }':
|
||||
!!! error TS2353: Property 'id' is missing in type '{ foo: string; }'.
|
||||
!!! error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other.
|
||||
!!! error TS2352: Type '{ foo: string; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2352: Property 'id' is missing in type '{ foo: string; }'.
|
||||
|
||||
// Should succeed, as the {} element causes the type of the array to be {}[]
|
||||
<{ id: number; }[]>[{ foo: "s" }, {}];
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/arraySigChecking.ts(11,17): error TS1023: An index signature parameter type must be 'string' or 'number'.
|
||||
tests/cases/compiler/arraySigChecking.ts(18,5): error TS2322: Type 'void[]' is not assignable to type 'string[]':
|
||||
tests/cases/compiler/arraySigChecking.ts(18,5): error TS2323: Type 'void[]' is not assignable to type 'string[]'.
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
tests/cases/compiler/arraySigChecking.ts(22,1): error TS2322: Type 'number[][]' is not assignable to type 'number[][][]':
|
||||
Type 'number[]' is not assignable to type 'number[][]':
|
||||
Type 'number' is not assignable to type 'number[]':
|
||||
tests/cases/compiler/arraySigChecking.ts(22,1): error TS2323: Type 'number[][]' is not assignable to type 'number[][][]'.
|
||||
Type 'number[]' is not assignable to type 'number[][]'.
|
||||
Type 'number' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -29,17 +29,17 @@ tests/cases/compiler/arraySigChecking.ts(22,1): error TS2322: Type 'number[][]'
|
||||
var myVar: myInt;
|
||||
var strArray: string[] = [myVar.voidFn()];
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type 'void[]' is not assignable to type 'string[]':
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'void[]' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Type 'void' is not assignable to type 'string'.
|
||||
|
||||
|
||||
var myArray: number[][][];
|
||||
myArray = [[1, 2]];
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'number[][]' is not assignable to type 'number[][][]':
|
||||
!!! error TS2322: Type 'number[]' is not assignable to type 'number[][]':
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'number[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number[][]' is not assignable to type 'number[][][]'.
|
||||
!!! error TS2323: Type 'number[]' is not assignable to type 'number[][]'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
|
||||
function isEmpty(l: { length: number }) {
|
||||
return l.length === 0;
|
||||
|
||||
@@ -2,7 +2,7 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,30): error TS1109: Expression expected.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,22): error TS1005: '=' expected.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,32): error TS1109: Expression expected.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }':
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
Property 'isArray' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,5): error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
|
||||
@@ -19,8 +19,8 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }':
|
||||
!!! error TS2322: Property 'isArray' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
|
||||
!!! error TS2323: Property 'isArray' is missing in type 'Number'.
|
||||
var xs4: typeof Array<typeof x>;
|
||||
~
|
||||
!!! error TS1005: '=' expected.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }':
|
||||
tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2323: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }':
|
||||
tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2323: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
Index signature is missing in type '{ one: number; }'.
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2322: Type '{ one: numbe
|
||||
|
||||
x = y;
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }':
|
||||
!!! error TS2322: Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
!!! error TS2323: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
!!! error TS2323: Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
y = x;
|
||||
~
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }':
|
||||
!!! error TS2322: Index signature is missing in type '{ one: number; }'.
|
||||
!!! error TS2323: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2323: Index signature is missing in type '{ one: number; }'.
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2322: Type '[number, string]' is not assignable to type 'number[]':
|
||||
Types of property 'pop' are incompatible:
|
||||
Type '() => string | number' is not assignable to type '() => number':
|
||||
Type 'string | number' is not assignable to type 'number':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2323: Type '[number, string]' is not assignable to type 'number[]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number' is not assignable to type '() => number'.
|
||||
Type 'string | number' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2322: Type '{}[]' is not assignable to type '[{}]':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2323: Type '{}[]' is not assignable to type '[{}]'.
|
||||
Property '0' is missing in type '{}[]'.
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// error
|
||||
numArray = numStrTuple;
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type '[number, string]' is not assignable to type 'number[]':
|
||||
!!! error TS2322: Types of property 'pop' are incompatible:
|
||||
!!! error TS2322: Type '() => string | number' is not assignable to type '() => number':
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'number':
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '[number, string]' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Types of property 'pop' are incompatible.
|
||||
!!! error TS2323: Type '() => string | number' is not assignable to type '() => number'.
|
||||
!!! error TS2323: Type 'string | number' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
emptyObjTuple = emptyObjArray;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{}[]' is not assignable to type '[{}]':
|
||||
!!! error TS2322: Property '0' is missing in type '{}[]'.
|
||||
!!! error TS2323: Type '{}[]' is not assignable to type '[{}]'.
|
||||
!!! error TS2323: Property '0' is missing in type '{}[]'.
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }':
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
Property 'b' is missing in type '{ a: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }':
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
Property 'b' is missing in type '{ a: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2323: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatBug2.ts (5 errors) ====
|
||||
var b2: { b: number;} = { a: 0 }; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }':
|
||||
!!! error TS2322: Property 'b' is missing in type '{ a: number; }'.
|
||||
!!! error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2323: Property 'b' is missing in type '{ a: number; }'.
|
||||
|
||||
b2 = { a: 0 }; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }':
|
||||
!!! error TS2322: Property 'b' is missing in type '{ a: number; }'.
|
||||
!!! error TS2323: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
!!! error TS2323: Property 'b' is missing in type '{ a: number; }'.
|
||||
|
||||
b2 = {b: 0, a: 0 };
|
||||
|
||||
@@ -33,16 +33,16 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n:
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
|
||||
!!! error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2323: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
|
||||
f: (n) => { return 0; },
|
||||
g: (s) => { return 0; },
|
||||
}; // error
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
!!! error TS2322: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
|
||||
!!! error TS2323: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2323: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
|
||||
f: (n) => { return 0; },
|
||||
m: 0,
|
||||
}; // error
|
||||
@@ -57,8 +57,8 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n:
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }':
|
||||
!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'.
|
||||
!!! error TS2323: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2323: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'.
|
||||
f: (n) => { return 0; },
|
||||
g: (s) => { return 0; },
|
||||
n: 0,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(4,5): error TS2345: Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'.
|
||||
Types of property 'name' are incompatible:
|
||||
Types of property 'name' are incompatible.
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'.
|
||||
Property 'id' is missing in type '{ name: string; }'.
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS
|
||||
foo({ id: 1234, name: false }); // Error, name of wrong type
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'.
|
||||
!!! error TS2345: Types of property 'name' are incompatible:
|
||||
!!! error TS2345: Types of property 'name' are incompatible.
|
||||
!!! error TS2345: Type 'boolean' is not assignable to type 'string'.
|
||||
foo({ name: "hello" }); // Error, id required but missing
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(35,1): error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(35,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(36,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(36,1): error TS2323: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(37,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(37,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(38,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(38,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(39,1): error TS2322: Type 'S2' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(39,1): error TS2323: Type 'S2' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(40,1): error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(40,1): error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(41,1): error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(41,1): error TS2323: Type '(x: string) => number' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(42,1): error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(42,1): error TS2323: Type '(x: string) => string' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -61,42 +61,42 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(31,1): error TS2322: Type '() => number' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(31,1): error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(32,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(32,1): error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(33,1): error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(33,1): error TS2323: Type '() => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(34,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(34,1): error TS2323: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(42,1): error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
Types of property 'f' are incompatible:
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(42,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(43,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T':
|
||||
Types of property 'f' are incompatible:
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(43,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(45,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(45,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(46,1): error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }':
|
||||
Types of property 'f' are incompatible:
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(46,1): error TS2323: Type 'S2' is not assignable to type '{ f(x: number): void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(47,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }':
|
||||
Types of property 'f' are incompatible:
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(47,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(48,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(48,1): error TS2323: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(49,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(49,1): error TS2323: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
|
||||
@@ -69,20 +69,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// errors
|
||||
t = () => 1;
|
||||
~
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
t = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
a = () => 1;
|
||||
~
|
||||
!!! error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2323: Type '() => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
a = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
|
||||
interface S2 {
|
||||
f(x: string): void;
|
||||
@@ -92,46 +92,46 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2323: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type 'Base' is not assignable to type '{ foo: number; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2323: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type 'Base' is not assignable to type '{ foo: number; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -68,22 +68,22 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b8: <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U;
|
||||
a8 = b8; // error, { foo: number } and Base are incompatible
|
||||
~~
|
||||
!!! error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2323: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
b8 = a8; // error, { foo: number } and Base are incompatible
|
||||
~~
|
||||
!!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any':
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
!!! error TS2323: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type '{ foo: number; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
var b10: <T extends Derived>(...x: T[]) => T;
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number':
|
||||
Types of parameters 'args' and 'args' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2323: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
Types of parameters 'args' and 'args' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number':
|
||||
Types of parameters 'x' and 'args' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2323: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
Types of parameters 'x' and 'args' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(26,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number':
|
||||
Types of parameters 'args' and 'z' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(26,5): error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'.
|
||||
Types of parameters 'args' and 'z' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(35,5): error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(35,5): error TS2323: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(36,5): error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'z' and 'y' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(36,5): error TS2323: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'z' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(37,5): error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(37,5): error TS2323: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(41,5): error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(41,5): error TS2323: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(43,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(43,5): error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(45,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
Types of parameters 'args' and 'z' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(45,5): error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Types of parameters 'args' and 'z' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -42,17 +42,17 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = (...args: number[]) => 1; // ok, same number of required params
|
||||
a = (...args: string[]) => 1; // error, type mismatch
|
||||
~
|
||||
!!! error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'args' and 'args' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'args' and 'args' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a = (x?: number) => 1; // ok, same number of required params
|
||||
a = (x?: number, y?: number, z?: number) => 1; // ok, same number of required params
|
||||
a = (x: number) => 1; // ok, rest param corresponds to infinite number of params
|
||||
a = (x?: string) => 1; // error, incompatible type
|
||||
~
|
||||
!!! error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'x' and 'args' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'args' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
var a2: (x: number, ...z: number[]) => number;
|
||||
@@ -63,9 +63,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = (x: number, ...args: number[]) => 1; // ok, same number of required params
|
||||
a2 = (x: number, ...args: string[]) => 1; // should be type mismatch error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'args' and 'z' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
a2 = (x: number, y: number) => 1; // ok, rest param corresponds to infinite number of params
|
||||
a2 = (x: number, y?: number) => 1; // ok, same number of required params
|
||||
|
||||
@@ -76,36 +76,36 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = (x: number, y: string) => 1; // ok, all present params match
|
||||
a3 = (x: number, y?: number, z?: number) => 1; // error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
a3 = (x: number, ...z: number[]) => 1; // error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'z' and 'y' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'z' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
a3 = (x: string, y?: string, z?: string) => 1; // error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
var a4: (x?: number, y?: string, ...z: number[]) => number;
|
||||
a4 = () => 1; // ok, fewer required params
|
||||
a4 = (x?: number, y?: number) => 1; // error, type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
a4 = (x: number) => 1; // ok, all present params match
|
||||
a4 = (x: number, y?: number) => 1; // error, second param has type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
a4 = (x?: number, y?: string) => 1; // ok, same number of required params with matching types
|
||||
a4 = (x: number, ...args: string[]) => 1; // error, rest params have type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number':
|
||||
!!! error TS2322: Types of parameters 'args' and 'z' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2323: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,30 +1,30 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(23,1): error TS2322: Type '() => number' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(23,1): error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(24,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(24,1): error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(25,1): error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(25,1): error TS2323: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '() => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(26,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(26,1): error TS2323: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(34,1): error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
Types of property 'f' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(34,1): error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T':
|
||||
Types of property 'f' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(38,1): error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
Types of property 'f' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(38,1): error TS2323: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(39,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
Types of property 'f' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(39,1): error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(40,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(40,1): error TS2323: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(41,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(41,1): error TS2323: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
|
||||
@@ -53,20 +53,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// errors
|
||||
t = () => 1;
|
||||
~
|
||||
!!! error TS2322: Type '() => number' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2323: Type '() => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
t = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
a = () => 1;
|
||||
~
|
||||
!!! error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '() => number'.
|
||||
!!! error TS2323: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '() => number'.
|
||||
a = function (x: number) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: number) => string'.
|
||||
!!! error TS2323: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: number) => string'.
|
||||
|
||||
interface S2 {
|
||||
f(x: string): void;
|
||||
@@ -76,38 +76,38 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
// these are errors
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Types of property 'f' are incompatible:
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2323: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Types of property 'f' are incompatible.
|
||||
!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => number'.
|
||||
!!! error TS2323: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => number'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }':
|
||||
!!! error TS2322: Property 'f' is missing in type '(x: string) => string'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'.
|
||||
!!! error TS2323: Property 'f' is missing in type '(x: string) => string'.
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(52,9): error TS2322: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(52,9): error TS2323: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(53,9): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type 'Base' is not assignable to type '{ foo: number; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(53,9): error TS2323: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type 'Base' is not assignable to type '{ foo: number; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(77,9): error TS2322: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(77,9): error TS2323: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(78,9): error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(78,9): error TS2323: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2322: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2323: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2322: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2323: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
|
||||
|
||||
@@ -80,22 +80,22 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b8: new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U;
|
||||
a8 = b8; // error, type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2323: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2323: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
b8 = a8; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U':
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any':
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
!!! error TS2323: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2323: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
!!! error TS2323: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type '{ foo: number; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
var b10: new <T extends Derived>(...x: T[]) => T;
|
||||
@@ -121,26 +121,26 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b16: new <T>(x: (a: T) => T) => T[];
|
||||
a16 = b16; // error
|
||||
~~~
|
||||
!!! error TS2322: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
!!! error TS2323: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
b16 = a16; // error
|
||||
~~~
|
||||
!!! error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
!!! error TS2323: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
|
||||
var b17: new <T>(x: (a: T) => T) => any[];
|
||||
a17 = b17; // error
|
||||
~~~
|
||||
!!! error TS2322: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
!!! error TS2323: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
b17 = a17; // error
|
||||
~~~
|
||||
!!! error TS2322: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
!!! error TS2323: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
}
|
||||
|
||||
module WithGenericSignaturesInBaseType {
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(14,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(18,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(32,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(33,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(33,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(36,9): error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(37,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
|
||||
|
||||
@@ -38,19 +38,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b;
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2;
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
class A<T extends Base> {
|
||||
@@ -66,28 +66,28 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: number]: Derived; }
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
var b3: { [x: number]: T; }
|
||||
a = b3; // ok
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(14,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(18,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(32,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(33,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(33,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(36,9): error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(37,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
|
||||
|
||||
@@ -38,19 +38,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b;
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2;
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
interface A<T extends Base> {
|
||||
@@ -66,28 +66,28 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: number]: Derived; }
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: number]: Derived2; }
|
||||
a = b2; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: number]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
var b3: { [x: number]: T; }
|
||||
a = b3; // ok
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(14,1): error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(14,1): error TS2323: Type '{ [x: number]: Base; }' is not assignable to type 'A'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(23,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Derived' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(23,1): error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(33,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(33,9): error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type '{ [x: number]: Base; }' is not assignable to type 'A'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
b = a; // ok
|
||||
|
||||
class B2 extends A {
|
||||
@@ -41,10 +41,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b2; // ok
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
|
||||
module Generics {
|
||||
class A<T extends Derived> {
|
||||
@@ -56,9 +56,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: number]: Derived; };
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: number]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
b = a; // ok
|
||||
|
||||
var b2: { [x: number]: T; };
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(24,5): error TS2322: Type 'T' is not assignable to type 'S':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(24,5): error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(25,5): error TS2322: Type 'S' is not assignable to type 'T':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(25,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(29,5): error TS2322: Type 'T2' is not assignable to type 'S2':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(29,5): error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(30,5): error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(30,5): error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(31,5): error TS2322: Type 'T' is not assignable to type 'S2':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(31,5): error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(32,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(32,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type 'S2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(35,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(35,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(36,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(36,5): error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(41,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(41,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(42,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(42,5): error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(43,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(43,5): error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(44,5): error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(44,5): error TS2323: Type 'T2' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(45,5): error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Derived2' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(45,5): error TS2323: Type 'T' is not assignable to type '{ foo: Derived; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Derived2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(70,5): error TS2322: Type 'S' is not assignable to type 'T':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(70,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(75,5): error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(75,5): error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(81,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(81,5): error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(87,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(87,5): error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
|
||||
|
||||
@@ -94,91 +94,91 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
s = t; // error
|
||||
~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
t = s; // error
|
||||
~
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
s = s2; // ok
|
||||
s = a2; // ok
|
||||
|
||||
s2 = t2; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T2' is not assignable to type 'S2':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
t2 = s2; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
s2 = t; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S2':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
s2 = b; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
s2 = a2; // ok
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
a = s; // ok
|
||||
a = s2; // ok
|
||||
a = a2; // ok
|
||||
|
||||
a2 = b2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Derived'.
|
||||
!!! error TS2323: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Derived'.
|
||||
a2 = b; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
a2 = t2; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type 'T2' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
a2 = t; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Derived2'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type '{ foo: Derived; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Derived2'.
|
||||
}
|
||||
|
||||
module WithBase {
|
||||
@@ -205,20 +205,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
s = t; // ok
|
||||
t = s; // error
|
||||
~
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
s = s2; // ok
|
||||
s = a2; // ok
|
||||
|
||||
s2 = t2; // ok
|
||||
t2 = s2; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
s2 = t; // ok
|
||||
s2 = b; // ok
|
||||
s2 = a2; // ok
|
||||
@@ -226,10 +226,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
a = s; // ok
|
||||
a = s2; // ok
|
||||
a = a2; // ok
|
||||
@@ -237,10 +237,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = b2; // ok
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }':
|
||||
!!! error TS2322: Types of property 'foo' are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'.
|
||||
!!! error TS2323: Types of property 'foo' are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
a2 = b; // ok
|
||||
a2 = t2; // ok
|
||||
a2 = t; // ok
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(13,1): error TS2322: Type 'I' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(13,1): error TS2323: Type 'I' is not assignable to type 'C'.
|
||||
Property 'foo' is missing in type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(14,1): error TS2322: Type 'C' is not assignable to type 'I':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(14,1): error TS2323: Type 'C' is not assignable to type 'I'.
|
||||
Property 'fooo' is missing in type 'C'.
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
c = i; // error
|
||||
~
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'foo' is missing in type 'I'.
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'foo' is missing in type 'I'.
|
||||
i = c; // error
|
||||
~
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'I':
|
||||
!!! error TS2322: Property 'fooo' is missing in type 'C'.
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'fooo' is missing in type 'C'.
|
||||
@@ -1,50 +1,50 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(36,5): error TS2322: Type 'E' is not assignable to type 'Base':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(36,5): error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(41,5): error TS2322: Type 'E' is not assignable to type 'I':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(41,5): error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(46,5): error TS2322: Type 'E' is not assignable to type 'D':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(46,5): error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(48,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(48,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(49,5): error TS2322: Type 'Base' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(49,5): error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(50,5): error TS2322: Type 'I' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(50,5): error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(51,5): error TS2322: Type 'D' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(51,5): error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(81,5): error TS2322: Type 'Base' is not assignable to type '{ foo: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(81,5): error TS2323: Type 'Base' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(82,5): error TS2322: Type 'I' is not assignable to type '{ foo: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(82,5): error TS2323: Type 'I' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(84,5): error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(86,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'Base':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(86,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'Base'.
|
||||
Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(88,5): error TS2322: Type 'D' is not assignable to type 'Base':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(88,5): error TS2323: Type 'D' is not assignable to type 'Base'.
|
||||
Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(89,5): error TS2322: Type 'E' is not assignable to type 'Base':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(89,5): error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(92,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'I':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(92,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'I'.
|
||||
Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(94,5): error TS2322: Type 'D' is not assignable to type 'I':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(94,5): error TS2323: Type 'D' is not assignable to type 'I'.
|
||||
Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(95,5): error TS2322: Type 'E' is not assignable to type 'I':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(95,5): error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(99,5): error TS2322: Type 'Base' is not assignable to type 'D':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(99,5): error TS2323: Type 'Base' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(100,5): error TS2322: Type 'I' is not assignable to type 'D':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(100,5): error TS2323: Type 'I' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(101,5): error TS2322: Type 'E' is not assignable to type 'D':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(101,5): error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(103,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(103,5): error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(104,5): error TS2322: Type 'Base' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(104,5): error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(105,5): error TS2322: Type 'I' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(105,5): error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
Types have separate declarations of a private property 'foo'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2322: Type 'D' is not assignable to type 'E':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
|
||||
|
||||
@@ -81,49 +81,49 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = d;
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
|
||||
b = a;
|
||||
b = i;
|
||||
b = d;
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'Base':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
|
||||
i = a;
|
||||
i = b;
|
||||
i = d;
|
||||
i = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'I':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
|
||||
d = a;
|
||||
d = b;
|
||||
d = i;
|
||||
d = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'D':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
|
||||
e = a; // errror
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
e = b; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'Base'.
|
||||
e = i; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'I'.
|
||||
e = d; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
e = e;
|
||||
|
||||
}
|
||||
@@ -155,78 +155,78 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type 'Base' is not assignable to type '{ foo: string; }':
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
a = i; // error
|
||||
~
|
||||
!!! error TS2322: Type 'I' is not assignable to type '{ foo: string; }':
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type 'I' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
a = d;
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'Base':
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'.
|
||||
b = i;
|
||||
b = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'Base':
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'Base':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'Base'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
b = b;
|
||||
|
||||
i = a; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'I':
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type '{ foo: string; }'.
|
||||
i = b;
|
||||
i = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'I':
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'I'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
i = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'I':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
i = i;
|
||||
|
||||
d = a;
|
||||
d = b; // error
|
||||
~
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'D':
|
||||
!!! error TS2322: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'Base' but not in type 'D'.
|
||||
d = i; // error
|
||||
~
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'D':
|
||||
!!! error TS2322: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'I' but not in type 'D'.
|
||||
d = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'D':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'D'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
|
||||
e = a; // errror
|
||||
~
|
||||
!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
!!! error TS2323: Type '{ foo: string; }' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type '{ foo: string; }'.
|
||||
e = b; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'E':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'E'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
e = i; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'E':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'foo'.
|
||||
!!! error TS2323: Type 'I' is not assignable to type 'E'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'foo'.
|
||||
e = d; // errror
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'E':
|
||||
!!! error TS2322: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'E'.
|
||||
!!! error TS2323: Property 'foo' is private in type 'E' but not in type 'D'.
|
||||
e = e;
|
||||
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(73,5): error TS2322: Type 'D' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(73,5): error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
Property 'opt' is optional in type 'D' but required in type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(74,5): error TS2322: Type 'E' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(74,5): error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
Property 'opt' is optional in type 'E' but required in type 'C'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(78,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(78,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(79,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(79,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(83,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(83,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
|
||||
|
||||
@@ -87,34 +87,34 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
c = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'D' but required in type 'C'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'D' but required in type 'C'.
|
||||
c = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'E' but required in type 'C'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'E' but required in type 'C'.
|
||||
c = f; // ok
|
||||
c = a; // ok
|
||||
|
||||
a = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
a = f; // ok
|
||||
a = c; // ok
|
||||
|
||||
b = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'.
|
||||
b = f; // ok
|
||||
b = a; // ok
|
||||
b = c; // ok
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2322: Type 'D' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
Property 'opt' is missing in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2322: Type 'E' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
Property 'opt' is missing in type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(76,5): error TS2322: Type 'F' is not assignable to type 'C':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(76,5): error TS2323: Type 'F' is not assignable to type 'C'.
|
||||
Property 'opt' is missing in type 'F'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(79,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(79,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(80,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(80,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(81,5): error TS2322: Type 'F' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(81,5): error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'F'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(84,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(84,5): error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'D'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(85,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(85,5): error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2322: Type 'F' is not assignable to type '{ opt: Base; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
Property 'opt' is missing in type 'F'.
|
||||
|
||||
|
||||
@@ -94,44 +94,44 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
c = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
c = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
c = f; // error
|
||||
~
|
||||
!!! error TS2322: Type 'F' is not assignable to type 'C':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2323: Type 'F' is not assignable to type 'C'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
c = a; // ok
|
||||
|
||||
a = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
a = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
a = f; // error
|
||||
~
|
||||
!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
a = c; // ok
|
||||
|
||||
b = d; // error
|
||||
~
|
||||
!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'D'.
|
||||
!!! error TS2323: Type 'D' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'D'.
|
||||
b = e; // error
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'E'.
|
||||
!!! error TS2323: Type 'E' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'E'.
|
||||
b = f; // error
|
||||
~
|
||||
!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }':
|
||||
!!! error TS2322: Property 'opt' is missing in type 'F'.
|
||||
!!! error TS2323: Type 'F' is not assignable to type '{ opt: Base; }'.
|
||||
!!! error TS2323: Property 'opt' is missing in type 'F'.
|
||||
b = a; // ok
|
||||
b = c; // ok
|
||||
}
|
||||
@@ -1,60 +1,60 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2322: Type 'T' is not assignable to type 'S':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
Property ''1'' is missing in type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2322: Type 'S' is not assignable to type 'T':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
Property ''1.'' is missing in type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2322: Type 'T2' is not assignable to type 'S2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type 'T2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
Property ''1.0'' is missing in type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2322: Type 'T' is not assignable to type 'S2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }'.
|
||||
Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2323: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type '{ '1': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }'.
|
||||
Property '1.0' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type 'S2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
Property ''1.'' is missing in type '{ 1.: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type '{ 1.: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
|
||||
Property '1.' is missing in type '{ '1.0': string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2323: Type 'T2' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type 'T2'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
Property ''1.0'' is missing in type 'T'.
|
||||
|
||||
|
||||
@@ -81,74 +81,74 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
|
||||
s = t;
|
||||
~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S':
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T'.
|
||||
t = s;
|
||||
~
|
||||
!!! error TS2322: Type 'S' is not assignable to type 'T':
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2323: Type 'S' is not assignable to type 'T'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
s = s2; // ok
|
||||
s = a2;
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
s2 = t2;
|
||||
~~
|
||||
!!! error TS2322: Type 'T2' is not assignable to type 'S2':
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T2'.
|
||||
!!! error TS2323: Type 'T2' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T2'.
|
||||
t2 = s2;
|
||||
~~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T2':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'S2'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type 'T2'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'S2'.
|
||||
s2 = t;
|
||||
~~
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'S2':
|
||||
!!! error TS2322: Property ''1'' is missing in type 'T'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type 'T'.
|
||||
s2 = b;
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
s2 = a2;
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
a = b;
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'.
|
||||
b = a;
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
a = s;
|
||||
~
|
||||
!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S2'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S2'.
|
||||
a = a2;
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
a2 = b2;
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ '1': string; }'.
|
||||
!!! error TS2323: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ '1': string; }'.
|
||||
b2 = a2;
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
a2 = b; // ok
|
||||
a2 = t2; // ok
|
||||
a2 = t;
|
||||
~~
|
||||
!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'T'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T'.
|
||||
}
|
||||
|
||||
module NumbersAndStrings {
|
||||
@@ -173,8 +173,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
s = s2; // ok
|
||||
s = a2; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
s2 = t2; // ok
|
||||
t2 = s2; // ok
|
||||
@@ -182,52 +182,52 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
s2 = b; // ok
|
||||
s2 = a2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2':
|
||||
!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type 'S2'.
|
||||
!!! error TS2323: Property ''1'' is missing in type '{ '1.0': string; }'.
|
||||
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
!!! error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }':
|
||||
!!! error TS2322: Property '1.0' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }'.
|
||||
!!! error TS2323: Property '1.0' is missing in type '{ '1.': string; bar?: string; }'.
|
||||
a = s; // error
|
||||
~
|
||||
!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S'.
|
||||
!!! error TS2323: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S'.
|
||||
a = s2; // error
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type 'S2'.
|
||||
!!! error TS2323: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type 'S2'.
|
||||
a = a2; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ '1.0': string; }'.
|
||||
a = b2; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }':
|
||||
!!! error TS2322: Property ''1.'' is missing in type '{ 1.: string; }'.
|
||||
!!! error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }'.
|
||||
!!! error TS2323: Property ''1.'' is missing in type '{ 1.: string; }'.
|
||||
|
||||
a2 = b2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ 1.: string; }'.
|
||||
!!! error TS2323: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ 1.: string; }'.
|
||||
b2 = a2; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }':
|
||||
!!! error TS2322: Property '1.' is missing in type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }'.
|
||||
!!! error TS2323: Property '1.' is missing in type '{ '1.0': string; }'.
|
||||
a2 = b; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
!!! error TS2323: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'.
|
||||
a2 = t2; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'T2'.
|
||||
!!! error TS2323: Type 'T2' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T2'.
|
||||
a2 = t; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }':
|
||||
!!! error TS2322: Property ''1.0'' is missing in type 'T'.
|
||||
!!! error TS2323: Type 'T' is not assignable to type '{ '1.0': string; }'.
|
||||
!!! error TS2323: Property ''1.0'' is missing in type 'T'.
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number':
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2323: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(19,1): error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number':
|
||||
Types of parameters 'x' and 's1' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(19,1): error TS2323: Type '(x: number) => number' is not assignable to type '(s1: string) => number'.
|
||||
Types of parameters 'x' and 's1' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number':
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2323: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2323: Type 'typeof C' is not assignable to type 'new (x: number) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -29,19 +29,19 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type
|
||||
|
||||
g = f2; // Error
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number':
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
g = f3; // Error
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number':
|
||||
!!! error TS2322: Types of parameters 'x' and 's1' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '(x: number) => number' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2323: Types of parameters 'x' and 's1' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
g = f4; // Error
|
||||
~
|
||||
!!! error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number':
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
class C {
|
||||
constructor(x: string);
|
||||
@@ -52,6 +52,6 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type
|
||||
|
||||
d = C; // Error
|
||||
~
|
||||
!!! error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void':
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'typeof C' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2323: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,32 +1,32 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(15,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(19,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(33,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(33,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(41,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(41,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(46,9): error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(47,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(47,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(50,9): error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(51,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
|
||||
|
||||
@@ -47,19 +47,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: string]: Derived2; }
|
||||
a = b2; // ok
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
class A<T extends Base> {
|
||||
@@ -75,10 +75,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b1; // ok
|
||||
b1 = a1; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
class B2 extends A<Base> {
|
||||
[x: string]: Derived2; // ok
|
||||
@@ -88,37 +88,37 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b2; // ok
|
||||
b2 = a1; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
function foo<T extends Base>() {
|
||||
var b3: { [x: string]: Derived; };
|
||||
var a3: A<T>;
|
||||
a3 = b3; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
b3 = a3; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b4: { [x: string]: Derived2; };
|
||||
a3 = b4; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
b4 = a3; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
}
|
||||
}
|
||||
@@ -1,32 +1,32 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(15,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(19,1): error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(33,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(33,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(41,5): error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'Base' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(41,5): error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(46,9): error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(47,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(47,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(50,9): error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Derived2' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
Index signatures are incompatible:
|
||||
Type 'T' is not assignable to type 'Derived2':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(51,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'Derived2'.
|
||||
Property 'baz' is missing in type 'Base'.
|
||||
|
||||
|
||||
@@ -47,19 +47,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b; // ok
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b2: { [x: string]: Derived2; }
|
||||
a = b2; // ok
|
||||
b2 = a; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
module Generics {
|
||||
interface A<T extends Base> {
|
||||
@@ -75,10 +75,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b1; // ok
|
||||
b1 = a1; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
interface B2 extends A<Base> {
|
||||
[x: string]: Derived2; // ok
|
||||
@@ -88,37 +88,37 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a1 = b2; // ok
|
||||
b2 = a1; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Base' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<Base>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Base' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
|
||||
function foo<T extends Base>() {
|
||||
var b3: { [x: string]: Derived; };
|
||||
var a3: A<T>;
|
||||
a3 = b3; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: string]: Derived; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived' is not assignable to type 'T'.
|
||||
b3 = a3; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived':
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived'.
|
||||
!!! error TS2323: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
var b4: { [x: string]: Derived2; };
|
||||
a3 = b4; // error
|
||||
~~
|
||||
!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'Derived2' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: string]: Derived2; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'Derived2' is not assignable to type 'T'.
|
||||
b4 = a3; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'Derived2':
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Base'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: Derived2; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'Derived2'.
|
||||
!!! error TS2323: Property 'baz' is missing in type 'Base'.
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(7,8): error TS2304: Cannot find name 'A'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(20,9): error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A<T>':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(20,9): error TS2323: Type '{ [x: string]: string; }' is not assignable to type 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(21,9): error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: string; }':
|
||||
Index signatures are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(21,9): error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: string; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'T' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
var b: { [x: string]: string; }
|
||||
a = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A<T>':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'T'.
|
||||
!!! error TS2323: Type '{ [x: string]: string; }' is not assignable to type 'A<T>'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'T'.
|
||||
b = a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'A<T>' is not assignable to type '{ [x: string]: string; }':
|
||||
!!! error TS2322: Index signatures are incompatible:
|
||||
!!! error TS2322: Type 'T' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'A<T>' is not assignable to type '{ [x: string]: string; }'.
|
||||
!!! error TS2323: Index signatures are incompatible.
|
||||
!!! error TS2323: Type 'T' is not assignable to type 'string'.
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>':
|
||||
tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability10.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__x4 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>':
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithPublicAndOptional<number, string>'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }':
|
||||
Types of property 'two' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }':
|
||||
Types of property 'one' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }':
|
||||
tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }':
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }':
|
||||
Types of property 'one' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }':
|
||||
Types of property 'two' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'boolean'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }':
|
||||
Types of property 'two' are incompatible:
|
||||
Type 'string' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'any[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: any[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'number[]':
|
||||
tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'number[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }':
|
||||
Types of property 'two' are incompatible:
|
||||
Type 'string' is not assignable to type 'number[]':
|
||||
tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'number[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number[]':
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'string[]':
|
||||
tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }':
|
||||
Types of property 'two' are incompatible:
|
||||
Type 'string' is not assignable to type 'string[]':
|
||||
tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'string[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'string[]':
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'boolean[]':
|
||||
tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }':
|
||||
Types of property 'two' are incompatible:
|
||||
Type 'string' is not assignable to type 'boolean[]':
|
||||
tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'boolean[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'boolean[]':
|
||||
!!! error TS2322: Property 'push' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: boolean[]; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2323: Property 'push' is missing in type 'String'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }':
|
||||
Types of property 'two' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
Types of property 'two' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }':
|
||||
!!! error TS2322: Types of property 'two' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: number; }'.
|
||||
!!! error TS2323: Types of property 'two' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }':
|
||||
Types of property 'one' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }':
|
||||
tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }':
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ two: string; }'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type '{ two: string; }'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }':
|
||||
Types of property 'one' are incompatible:
|
||||
tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
@@ -14,6 +14,6 @@ tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'any[]':
|
||||
tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'any[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: any[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'any[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'number[]':
|
||||
tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'number[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: number[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'string[]':
|
||||
tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: string[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }':
|
||||
Types of property 'one' are incompatible:
|
||||
Type 'number' is not assignable to type 'boolean[]':
|
||||
tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }':
|
||||
!!! error TS2322: Types of property 'one' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean[]':
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ one: boolean[]; }'.
|
||||
!!! error TS2323: Types of property 'one' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean[]'.
|
||||
!!! error TS2323: Property 'length' is missing in type 'Number'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }':
|
||||
tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }'.
|
||||
Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }':
|
||||
!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }'.
|
||||
!!! error TS2323: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }':
|
||||
tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }'.
|
||||
Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }':
|
||||
!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2323: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>':
|
||||
tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithTwoPublic<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__x2 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>':
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithTwoPublic<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPublic<number, string>'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'classWithTwoPublic<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>':
|
||||
tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>'.
|
||||
Property 'one' is private in type 'classWithPrivate<number>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__x5 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>':
|
||||
!!! error TS2322: Property 'one' is private in type 'classWithPrivate<number>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPrivate<number>'.
|
||||
!!! error TS2323: Property 'one' is private in type 'classWithPrivate<number>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>':
|
||||
tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>'.
|
||||
Property 'one' is private in type 'classWithTwoPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__x6 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>':
|
||||
!!! error TS2322: Property 'one' is private in type 'classWithTwoPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithTwoPrivate<number, string>'.
|
||||
!!! error TS2323: Property 'one' is private in type 'classWithTwoPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>':
|
||||
tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>'.
|
||||
Property 'two' is private in type 'classWithPublicPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__x7 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>':
|
||||
!!! error TS2322: Property 'two' is private in type 'classWithPublicPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'classWithPublicPrivate<number, string>'.
|
||||
!!! error TS2323: Property 'two' is private in type 'classWithPublicPrivate<number, string>' but not in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>':
|
||||
tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>'.
|
||||
Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'interfaceTwo<number, string>'.
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2322: Type 'inte
|
||||
}
|
||||
__test2__.__val__obj2 = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>':
|
||||
!!! error TS2322: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'interfaceTwo<number, string>'.
|
||||
!!! error TS2323: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type 'interfaceTwo<number, string>'.
|
||||
!!! error TS2323: Property 'two' is optional in type 'interfaceWithPublicAndOptional<number, string>' but required in type 'interfaceTwo<number, string>'.
|
||||
@@ -1,10 +1,10 @@
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Applicable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2323: Type 'string' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type 'String'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2322: Type 'string[]' is not assignable to type 'Applicable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2323: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type 'string[]'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Applicable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2323: Type 'number' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type 'Number'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2322: Type '{}' is not assignable to type 'Applicable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2323: Type '{}' is not assignable to type 'Applicable'.
|
||||
Property 'apply' is missing in type '{}'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Applicable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Applicable'.
|
||||
@@ -25,20 +25,20 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-functi
|
||||
// Should fail
|
||||
x = '';
|
||||
~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Applicable':
|
||||
!!! error TS2322: Property 'apply' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'String'.
|
||||
x = [''];
|
||||
~
|
||||
!!! error TS2322: Type 'string[]' is not assignable to type 'Applicable':
|
||||
!!! error TS2322: Property 'apply' is missing in type 'string[]'.
|
||||
!!! error TS2323: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'string[]'.
|
||||
x = 4;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Applicable':
|
||||
!!! error TS2322: Property 'apply' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type 'Number'.
|
||||
x = {};
|
||||
~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Applicable':
|
||||
!!! error TS2322: Property 'apply' is missing in type '{}'.
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'Applicable'.
|
||||
!!! error TS2323: Property 'apply' is missing in type '{}'.
|
||||
|
||||
// Should work
|
||||
function f() { };
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Callable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2323: Type 'string' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type 'String'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2322: Type 'string[]' is not assignable to type 'Callable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2323: Type 'string[]' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type 'string[]'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Callable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2323: Type 'number' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type 'Number'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2322: Type '{}' is not assignable to type 'Callable':
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2323: Type '{}' is not assignable to type 'Callable'.
|
||||
Property 'call' is missing in type '{}'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Callable'.
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Callable'.
|
||||
@@ -25,20 +25,20 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-functio
|
||||
// Should fail
|
||||
x = '';
|
||||
~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Callable':
|
||||
!!! error TS2322: Property 'call' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'String'.
|
||||
x = [''];
|
||||
~
|
||||
!!! error TS2322: Type 'string[]' is not assignable to type 'Callable':
|
||||
!!! error TS2322: Property 'call' is missing in type 'string[]'.
|
||||
!!! error TS2323: Type 'string[]' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'string[]'.
|
||||
x = 4;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Callable':
|
||||
!!! error TS2322: Property 'call' is missing in type 'Number'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type 'Number'.
|
||||
x = {};
|
||||
~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Callable':
|
||||
!!! error TS2322: Property 'call' is missing in type '{}'.
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'Callable'.
|
||||
!!! error TS2323: Property 'call' is missing in type '{}'.
|
||||
|
||||
// Should work
|
||||
function f() { };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/assignmentToObject.ts(3,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object':
|
||||
Types of property 'toString' are incompatible:
|
||||
tests/cases/compiler/assignmentToObject.ts(3,5): error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type 'number' is not assignable to type '() => string'.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ tests/cases/compiler/assignmentToObject.ts(3,5): error TS2322: Type '{ toString:
|
||||
var b: {} = a; // ok
|
||||
var c: Object = a; // should be error
|
||||
~
|
||||
!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object':
|
||||
!!! error TS2322: Types of property 'toString' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type '() => string'.
|
||||
!!! error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
!!! error TS2323: Types of property 'toString' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '() => string'.
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(1,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object':
|
||||
Types of property 'toString' are incompatible:
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(1,5): error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type 'number' is not assignable to type '() => string'.
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(8,5): error TS2322: Type '{}' is not assignable to type 'Function':
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(8,5): error TS2323: Type '{}' is not assignable to type 'Function'.
|
||||
Property 'apply' is missing in type '{}'.
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type 'typeof bad' is not assignable to type 'Function':
|
||||
Types of property 'apply' are incompatible:
|
||||
tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2323: Type 'typeof bad' is not assignable to type 'Function'.
|
||||
Types of property 'apply' are incompatible.
|
||||
Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentToObjectAndFunction.ts (3 errors) ====
|
||||
var errObj: Object = { toString: 0 }; // Error, incompatible toString
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object':
|
||||
!!! error TS2322: Types of property 'toString' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type '() => string'.
|
||||
!!! error TS2323: Type '{ toString: number; }' is not assignable to type 'Object'.
|
||||
!!! error TS2323: Types of property 'toString' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '() => string'.
|
||||
var goodObj: Object = {
|
||||
toString(x?) {
|
||||
return "";
|
||||
@@ -22,8 +22,8 @@ tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type
|
||||
|
||||
var errFun: Function = {}; // Error for no call signature
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Function':
|
||||
!!! error TS2322: Property 'apply' is missing in type '{}'.
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'Function'.
|
||||
!!! error TS2323: Property 'apply' is missing in type '{}'.
|
||||
|
||||
function foo() { }
|
||||
module foo {
|
||||
@@ -46,6 +46,6 @@ tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type
|
||||
|
||||
var badFundule: Function = bad; // error
|
||||
~~~~~~~~~~
|
||||
!!! error TS2322: Type 'typeof bad' is not assignable to type 'Function':
|
||||
!!! error TS2322: Types of property 'apply' are incompatible:
|
||||
!!! error TS2322: Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'.
|
||||
!!! error TS2323: Type 'typeof bad' is not assignable to type 'Function'.
|
||||
!!! error TS2323: Types of property 'apply' are incompatible.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'.
|
||||
@@ -6,14 +6,14 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(17,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(18,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(25,5): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
Types of property 'x' are incompatible:
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,1): error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
Types of property 'x' are incompatible:
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,1): error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
Types of property 'x' are incompatible:
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,1): error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(37,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(38,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
@@ -79,19 +79,19 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize
|
||||
|
||||
M2.M3 = { x: '' }; // Error
|
||||
~~~~~
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
!!! error TS2322: Types of property 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2323: Types of property 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
(M2).M3 = { x: '' }; // Error
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
!!! error TS2322: Types of property 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2323: Types of property 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
(M2.M3) = { x: '' }; // Error
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3':
|
||||
!!! error TS2322: Types of property 'x' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '{ x: string; }' is not assignable to type 'typeof M3'.
|
||||
!!! error TS2323: Types of property 'x' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
function fn() { }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(15,5): error TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }':
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(15,5): error TS2323: Type '{}' is not assignable to type '{ [x: number]: Foo; }'.
|
||||
Index signature is missing in type '{}'.
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }':
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2323: Type '() => void' is not assignable to type '{ [x: number]: Bar; }'.
|
||||
Index signature is missing in type '() => void'.
|
||||
|
||||
|
||||
@@ -21,14 +21,14 @@ tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignatur
|
||||
|
||||
var v1: {
|
||||
~~
|
||||
!!! error TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }':
|
||||
!!! error TS2322: Index signature is missing in type '{}'.
|
||||
!!! error TS2323: Type '{}' is not assignable to type '{ [x: number]: Foo; }'.
|
||||
!!! error TS2323: Index signature is missing in type '{}'.
|
||||
[n: number]: Foo
|
||||
} = o; // Should be allowed
|
||||
|
||||
var v2: {
|
||||
~~
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }':
|
||||
!!! error TS2322: Index signature is missing in type '() => void'.
|
||||
!!! error TS2323: Type '() => void' is not assignable to type '{ [x: number]: Bar; }'.
|
||||
!!! error TS2323: Index signature is missing in type '() => void'.
|
||||
[n: number]: Bar
|
||||
} = f; // Should be allowed
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y':
|
||||
tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y'.
|
||||
Named properties 'm' of types 'X' and 'Y' are not identical.
|
||||
|
||||
|
||||
@@ -12,5 +12,5 @@ tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interfac
|
||||
|
||||
interface Z extends X, Y { }
|
||||
~
|
||||
!!! error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y':
|
||||
!!! error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y'.
|
||||
!!! error TS2320: Named properties 'm' of types 'X' and 'Y' are not identical.
|
||||
@@ -2,7 +2,7 @@ tests/cases/compiler/bases.ts(7,15): error TS1005: ';' expected.
|
||||
tests/cases/compiler/bases.ts(13,15): error TS1005: ';' expected.
|
||||
tests/cases/compiler/bases.ts(7,14): error TS2339: Property 'y' does not exist on type 'B'.
|
||||
tests/cases/compiler/bases.ts(7,17): error TS2304: Cannot find name 'any'.
|
||||
tests/cases/compiler/bases.ts(11,7): error TS2421: Class 'C' incorrectly implements interface 'I':
|
||||
tests/cases/compiler/bases.ts(11,7): error TS2420: Class 'C' incorrectly implements interface 'I'.
|
||||
Property 'x' is missing in type 'C'.
|
||||
tests/cases/compiler/bases.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call.
|
||||
tests/cases/compiler/bases.ts(13,14): error TS2339: Property 'x' does not exist on type 'C'.
|
||||
@@ -30,8 +30,8 @@ tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist o
|
||||
|
||||
class C extends B implements I {
|
||||
~
|
||||
!!! error TS2421: Class 'C' incorrectly implements interface 'I':
|
||||
!!! error TS2421: Property 'x' is missing in type 'C'.
|
||||
!!! error TS2420: Class 'C' incorrectly implements interface 'I'.
|
||||
!!! error TS2420: Property 'x' is missing in type 'C'.
|
||||
constructor() {
|
||||
~~~~~~~~~~~~~~~
|
||||
this.x: any;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts(57,15): error TS2429: Interface 'I2' incorrectly extends interface 'Base2':
|
||||
Types of property 'a' are incompatible:
|
||||
Type '(x: number) => string' is not assignable to type '(x: number) => number':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts(57,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
Types of property 'a' are incompatible.
|
||||
Type '(x: number) => string' is not assignable to type '(x: number) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -63,10 +63,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign
|
||||
// S's
|
||||
interface I2 extends Base2 {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2':
|
||||
!!! error TS2429: Types of property 'a' are incompatible:
|
||||
!!! error TS2429: Type '(x: number) => string' is not assignable to type '(x: number) => number':
|
||||
!!! error TS2429: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
!!! error TS2430: Types of property 'a' are incompatible.
|
||||
!!! error TS2430: Type '(x: number) => string' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2430: Type 'string' is not assignable to type 'number'.
|
||||
// N's
|
||||
a: (x: number) => string; // error because base returns non-void;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(51,19): error TS2429: Interface 'I2<T, U>' incorrectly extends interface 'A':
|
||||
Types of property 'a2' are incompatible:
|
||||
Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(51,19): error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
Types of property 'a2' are incompatible.
|
||||
Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(60,19): error TS2429: Interface 'I4' incorrectly extends interface 'A':
|
||||
Types of property 'a8' are incompatible:
|
||||
Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(60,19): error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
Types of property 'a8' are incompatible.
|
||||
Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -67,11 +67,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign
|
||||
|
||||
interface I2<T, U> extends A {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I2<T, U>' incorrectly extends interface 'A':
|
||||
!!! error TS2429: Types of property 'a2' are incompatible:
|
||||
!!! error TS2429: Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]':
|
||||
!!! error TS2429: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2429: Type 'T' is not assignable to type 'number'.
|
||||
!!! error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a2' are incompatible.
|
||||
!!! error TS2430: Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]'.
|
||||
!!! error TS2430: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2430: Type 'T' is not assignable to type 'number'.
|
||||
a2: (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic
|
||||
}
|
||||
|
||||
@@ -82,15 +82,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign
|
||||
|
||||
interface I4 extends A {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I4' incorrectly extends interface 'A':
|
||||
!!! error TS2429: Types of property 'a8' are incompatible:
|
||||
!!! error TS2429: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
!!! error TS2429: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2429: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
!!! error TS2429: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2429: Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
!!! error TS2429: Types of property 'foo' are incompatible:
|
||||
!!! error TS2429: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a8' are incompatible.
|
||||
!!! error TS2430: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2430: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2430: Types of property 'foo' are incompatible.
|
||||
!!! error TS2430: Type 'number' is not assignable to type 'string'.
|
||||
a8: <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(8,11): error TS2320: Interface 'A' cannot simultaneously extend types 'I<number>' and 'I<string>':
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(8,11): error TS2320: Interface 'A' cannot simultaneously extend types 'I<number>' and 'I<string>'.
|
||||
Named properties 'foo' of types 'I<number>' and 'I<string>' are not identical.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(13,16): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
|
||||
|
||||
@@ -13,7 +13,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesTha
|
||||
|
||||
interface A extends I<number>, I<string> { }
|
||||
~
|
||||
!!! error TS2320: Interface 'A' cannot simultaneously extend types 'I<number>' and 'I<string>':
|
||||
!!! error TS2320: Interface 'A' cannot simultaneously extend types 'I<number>' and 'I<string>'.
|
||||
!!! error TS2320: Named properties 'foo' of types 'I<number>' and 'I<string>' are not identical.
|
||||
|
||||
var x: A;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(13,23): error TS2353: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other:
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(13,23): error TS2352: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other.
|
||||
Property '2' is missing in type '[number, string]'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(16,21): error TS2353: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other:
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(16,21): error TS2352: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other.
|
||||
Property '2' is missing in type '[C, D]'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(24,10): error TS2353: Neither type '[number, string]' nor type '[number, number]' is assignable to the other:
|
||||
Types of property '1' are incompatible:
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(24,10): error TS2352: Neither type '[number, string]' nor type '[number, number]' is assignable to the other.
|
||||
Types of property '1' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(25,10): error TS2353: Neither type '[C, D]' nor type '[A, I]' is assignable to the other:
|
||||
Types of property '0' are incompatible:
|
||||
Type 'C' is not assignable to type 'A':
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(25,10): error TS2352: Neither type '[C, D]' nor type '[A, I]' is assignable to the other.
|
||||
Types of property '0' are incompatible.
|
||||
Type 'C' is not assignable to type 'A'.
|
||||
Property 'a' is missing in type 'C'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(26,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'array1' must be of type '{}[]', but here has type 'number[]'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(26,14): error TS2353: Neither type '[number, string]' nor type 'number[]' is assignable to the other:
|
||||
Types of property 'pop' are incompatible:
|
||||
Type '() => string | number' is not assignable to type '() => number':
|
||||
Type 'string | number' is not assignable to type 'number':
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(26,14): error TS2352: Neither type '[number, string]' nor type 'number[]' is assignable to the other.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number' is not assignable to type '() => number'.
|
||||
Type 'string | number' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(27,1): error TS2304: Cannot find name 't4'.
|
||||
|
||||
@@ -33,14 +33,14 @@ tests/cases/conformance/types/tuple/castingTuple.ts(27,1): error TS2304: Cannot
|
||||
var emptyObjTuple = <[{}, {}]>numStrTuple;
|
||||
var numStrBoolTuple = <[number, string, boolean]>numStrTuple;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other:
|
||||
!!! error TS2353: Property '2' is missing in type '[number, string]'.
|
||||
!!! error TS2352: Neither type '[number, string]' nor type '[number, string, boolean]' is assignable to the other.
|
||||
!!! error TS2352: Property '2' is missing in type '[number, string]'.
|
||||
var classCDTuple: [C, D] = [new C(), new D()];
|
||||
var interfaceIITuple = <[I, I]>classCDTuple;
|
||||
var classCDATuple = <[C, D, A]>classCDTuple;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other:
|
||||
!!! error TS2353: Property '2' is missing in type '[C, D]'.
|
||||
!!! error TS2352: Neither type '[C, D]' nor type '[C, D, A]' is assignable to the other.
|
||||
!!! error TS2352: Property '2' is missing in type '[C, D]'.
|
||||
var eleFromCDA1 = classCDATuple[2]; // A
|
||||
var eleFromCDA2 = classCDATuple[5]; // {}
|
||||
var t10: [E1, E2] = [E1.one, E2.one];
|
||||
@@ -50,24 +50,24 @@ tests/cases/conformance/types/tuple/castingTuple.ts(27,1): error TS2304: Cannot
|
||||
// error
|
||||
var t3 = <[number, number]>numStrTuple;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '[number, string]' nor type '[number, number]' is assignable to the other:
|
||||
!!! error TS2353: Types of property '1' are incompatible:
|
||||
!!! error TS2353: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2352: Neither type '[number, string]' nor type '[number, number]' is assignable to the other.
|
||||
!!! error TS2352: Types of property '1' are incompatible.
|
||||
!!! error TS2352: Type 'string' is not assignable to type 'number'.
|
||||
var t9 = <[A, I]>classCDTuple;
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '[C, D]' nor type '[A, I]' is assignable to the other:
|
||||
!!! error TS2353: Types of property '0' are incompatible:
|
||||
!!! error TS2353: Type 'C' is not assignable to type 'A':
|
||||
!!! error TS2353: Property 'a' is missing in type 'C'.
|
||||
!!! error TS2352: Neither type '[C, D]' nor type '[A, I]' is assignable to the other.
|
||||
!!! error TS2352: Types of property '0' are incompatible.
|
||||
!!! error TS2352: Type 'C' is not assignable to type 'A'.
|
||||
!!! error TS2352: Property 'a' is missing in type 'C'.
|
||||
var array1 = <number[]>numStrTuple;
|
||||
~~~~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'array1' must be of type '{}[]', but here has type 'number[]'.
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2353: Neither type '[number, string]' nor type 'number[]' is assignable to the other:
|
||||
!!! error TS2353: Types of property 'pop' are incompatible:
|
||||
!!! error TS2353: Type '() => string | number' is not assignable to type '() => number':
|
||||
!!! error TS2353: Type 'string | number' is not assignable to type 'number':
|
||||
!!! error TS2353: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2352: Neither type '[number, string]' nor type 'number[]' is assignable to the other.
|
||||
!!! error TS2352: Types of property 'pop' are incompatible.
|
||||
!!! error TS2352: Type '() => string | number' is not assignable to type '() => number'.
|
||||
!!! error TS2352: Type 'string | number' is not assignable to type 'number'.
|
||||
!!! error TS2352: Type 'string' is not assignable to type 'number'.
|
||||
t4[2] = 10;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 't4'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,1): error TS2322: Type 'Z' is not assignable to type 'X':
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,1): error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,6): error TS2322: Type 'Z' is not assignable to type 'Y':
|
||||
tests/cases/compiler/chainedAssignment1.ts(21,6): error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
tests/cases/compiler/chainedAssignment1.ts(22,1): error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
|
||||
@@ -28,11 +28,11 @@ tests/cases/compiler/chainedAssignment1.ts(22,1): error TS2323: Type 'Z' is not
|
||||
var c3 = new Z();
|
||||
c1 = c2 = c3; // a bug made this not report the same error as below
|
||||
~~
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'X':
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
~~
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'Y':
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
c2 = c3; // Error TS111: Cannot convert Z to Y
|
||||
~~
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/chainedAssignment3.ts(18,1): error TS2322: Type 'A' is not assignable to type 'B':
|
||||
tests/cases/compiler/chainedAssignment3.ts(18,1): error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
Property 'value' is missing in type 'A'.
|
||||
tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
|
||||
@@ -23,8 +23,8 @@ tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2323: Type 'A' is not
|
||||
// error cases
|
||||
b = a = new A();
|
||||
~
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B':
|
||||
!!! error TS2322: Property 'value' is missing in type 'A'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
!!! error TS2323: Property 'value' is missing in type 'A'.
|
||||
a = b = new A();
|
||||
~
|
||||
!!! error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,1): error TS2322: Type 'Z' is not assignable to type 'X':
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,1): error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2322: Type 'Z' is not assignable to type 'Y':
|
||||
tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
Property 'a' is missing in type 'Z'.
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2322: Type 'Z'
|
||||
|
||||
c1 = c2 = c3; // Should be error
|
||||
~~
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'X':
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'X'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
~~
|
||||
!!! error TS2322: Type 'Z' is not assignable to type 'Y':
|
||||
!!! error TS2322: Property 'a' is missing in type 'Z'.
|
||||
!!! error TS2323: Type 'Z' is not assignable to type 'Y'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'Z'.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7): error TS2421: Class 'D2' incorrectly implements interface 'I':
|
||||
tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7): error TS2420: Class 'D2' incorrectly implements interface 'I'.
|
||||
Types have separate declarations of a private property 'x'.
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ tests/cases/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.ts(10,7)
|
||||
|
||||
class D2 implements I {
|
||||
~~
|
||||
!!! error TS2421: Class 'D2' incorrectly implements interface 'I':
|
||||
!!! error TS2421: Types have separate declarations of a private property 'x'.
|
||||
!!! error TS2420: Class 'D2' incorrectly implements interface 'I'.
|
||||
!!! error TS2420: Types have separate declarations of a private property 'x'.
|
||||
public foo(x: any) { return x }
|
||||
private x = 3;
|
||||
other(x: any) { return x }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/classImplementsClass2.ts(2,7): error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
tests/cases/compiler/classImplementsClass2.ts(2,7): error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
Property 'foo' is missing in type 'C'.
|
||||
tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
Property 'foo' is missing in type 'C'.
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2322: Type 'C' is n
|
||||
class A { foo(): number { return 1; } }
|
||||
class C implements A {} // error
|
||||
~
|
||||
!!! error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
!!! error TS2421: Property 'foo' is missing in type 'C'.
|
||||
!!! error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
!!! error TS2420: Property 'foo' is missing in type 'C'.
|
||||
|
||||
class C2 extends A {
|
||||
foo() {
|
||||
@@ -22,5 +22,5 @@ tests/cases/compiler/classImplementsClass2.ts(13,1): error TS2322: Type 'C' is n
|
||||
c = c2;
|
||||
c2 = c;
|
||||
~~
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'foo' is missing in type 'C'.
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'foo' is missing in type 'C'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/classImplementsClass4.ts(5,7): error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
tests/cases/compiler/classImplementsClass4.ts(5,7): error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
Property 'x' is missing in type 'C'.
|
||||
tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
Property 'x' is missing in type 'C'.
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2322: Type 'C' is n
|
||||
}
|
||||
class C implements A {
|
||||
~
|
||||
!!! error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
!!! error TS2421: Property 'x' is missing in type 'C'.
|
||||
!!! error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
!!! error TS2420: Property 'x' is missing in type 'C'.
|
||||
foo() {
|
||||
return 1;
|
||||
}
|
||||
@@ -25,5 +25,5 @@ tests/cases/compiler/classImplementsClass4.ts(16,1): error TS2322: Type 'C' is n
|
||||
c = c2;
|
||||
c2 = c;
|
||||
~~
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
!!! error TS2322: Property 'x' is missing in type 'C'.
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Property 'x' is missing in type 'C'.
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/compiler/classImplementsClass5.ts(5,7): error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
tests/cases/compiler/classImplementsClass5.ts(5,7): error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
Types have separate declarations of a private property 'x'.
|
||||
tests/cases/compiler/classImplementsClass5.ts(16,1): error TS2322: Type 'C2' is not assignable to type 'C':
|
||||
tests/cases/compiler/classImplementsClass5.ts(16,1): error TS2323: Type 'C2' is not assignable to type 'C'.
|
||||
Types have separate declarations of a private property 'x'.
|
||||
tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
Types have separate declarations of a private property 'x'.
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is n
|
||||
}
|
||||
class C implements A {
|
||||
~
|
||||
!!! error TS2421: Class 'C' incorrectly implements interface 'A':
|
||||
!!! error TS2421: Types have separate declarations of a private property 'x'.
|
||||
!!! error TS2420: Class 'C' incorrectly implements interface 'A'.
|
||||
!!! error TS2420: Types have separate declarations of a private property 'x'.
|
||||
private x = 1;
|
||||
foo() {
|
||||
return 1;
|
||||
@@ -27,9 +27,9 @@ tests/cases/compiler/classImplementsClass5.ts(17,1): error TS2322: Type 'C' is n
|
||||
var c2: C2;
|
||||
c = c2;
|
||||
~
|
||||
!!! error TS2322: Type 'C2' is not assignable to type 'C':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'x'.
|
||||
!!! error TS2323: Type 'C2' is not assignable to type 'C'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'x'.
|
||||
c2 = c;
|
||||
~~
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'C2':
|
||||
!!! error TS2322: Types have separate declarations of a private property 'x'.
|
||||
!!! error TS2323: Type 'C' is not assignable to type 'C2'.
|
||||
!!! error TS2323: Types have separate declarations of a private property 'x'.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts(11,7): error TS2416: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>':
|
||||
Types of property 'foo' are incompatible:
|
||||
Type '{ bar?: string; }' is not assignable to type '{ bar: string; }':
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classIsSubtypeOfBaseType.ts(11,7): error TS2415: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '{ bar?: string; }' is not assignable to type '{ bar: string; }'.
|
||||
Property 'bar' is optional in type '{ bar?: string; }' but required in type '{ bar: string; }'.
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
|
||||
class Derived2 extends Base<{ bar: string; }> {
|
||||
~~~~~~~~
|
||||
!!! error TS2416: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>':
|
||||
!!! error TS2416: Types of property 'foo' are incompatible:
|
||||
!!! error TS2416: Type '{ bar?: string; }' is not assignable to type '{ bar: string; }':
|
||||
!!! error TS2416: Property 'bar' is optional in type '{ bar?: string; }' but required in type '{ bar: string; }'.
|
||||
!!! error TS2415: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>'.
|
||||
!!! error TS2415: Types of property 'foo' are incompatible.
|
||||
!!! error TS2415: Type '{ bar?: string; }' is not assignable to type '{ bar: string; }'.
|
||||
!!! error TS2415: Property 'bar' is optional in type '{ bar?: string; }' but required in type '{ bar: string; }'.
|
||||
foo: {
|
||||
bar?: string; // error
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ tests/cases/compiler/classUpdateTests.ts(43,18): error TS2335: 'super' can only
|
||||
tests/cases/compiler/classUpdateTests.ts(46,17): error TS2311: A class may only extend another class.
|
||||
tests/cases/compiler/classUpdateTests.ts(47,18): error TS2335: 'super' can only be referenced in a derived class.
|
||||
tests/cases/compiler/classUpdateTests.ts(57,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
|
||||
tests/cases/compiler/classUpdateTests.ts(63,7): error TS2416: Class 'L' incorrectly extends base class 'G':
|
||||
tests/cases/compiler/classUpdateTests.ts(63,7): error TS2415: Class 'L' incorrectly extends base class 'G'.
|
||||
Property 'p1' is private in type 'L' but not in type 'G'.
|
||||
tests/cases/compiler/classUpdateTests.ts(69,7): error TS2416: Class 'M' incorrectly extends base class 'G':
|
||||
tests/cases/compiler/classUpdateTests.ts(69,7): error TS2415: Class 'M' incorrectly extends base class 'G'.
|
||||
Property 'p1' is private in type 'M' but not in type 'G'.
|
||||
tests/cases/compiler/classUpdateTests.ts(70,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
|
||||
tests/cases/compiler/classUpdateTests.ts(105,15): error TS2339: Property 'p1' does not exist on type 'Q'.
|
||||
@@ -96,8 +96,8 @@ tests/cases/compiler/classUpdateTests.ts(111,16): error TS2339: Property 'p1' do
|
||||
|
||||
class L extends G {
|
||||
~
|
||||
!!! error TS2416: Class 'L' incorrectly extends base class 'G':
|
||||
!!! error TS2416: Property 'p1' is private in type 'L' but not in type 'G'.
|
||||
!!! error TS2415: Class 'L' incorrectly extends base class 'G'.
|
||||
!!! error TS2415: Property 'p1' is private in type 'L' but not in type 'G'.
|
||||
constructor(private p1:number) {
|
||||
super(); // NO ERROR
|
||||
}
|
||||
@@ -105,8 +105,8 @@ tests/cases/compiler/classUpdateTests.ts(111,16): error TS2339: Property 'p1' do
|
||||
|
||||
class M extends G {
|
||||
~
|
||||
!!! error TS2416: Class 'M' incorrectly extends base class 'G':
|
||||
!!! error TS2416: Property 'p1' is private in type 'M' but not in type 'G'.
|
||||
!!! error TS2415: Class 'M' incorrectly extends base class 'G'.
|
||||
!!! error TS2415: Property 'p1' is private in type 'M' but not in type 'G'.
|
||||
constructor(private p1:number) { // ERROR
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
var i = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/classWithMultipleBaseClasses.ts(18,7): error TS2421: Class 'D' incorrectly implements interface 'I':
|
||||
tests/cases/compiler/classWithMultipleBaseClasses.ts(18,7): error TS2420: Class 'D' incorrectly implements interface 'I'.
|
||||
Property 'foo' is missing in type 'D'.
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ tests/cases/compiler/classWithMultipleBaseClasses.ts(18,7): error TS2421: Class
|
||||
|
||||
class D implements I, J {
|
||||
~
|
||||
!!! error TS2421: Class 'D' incorrectly implements interface 'I':
|
||||
!!! error TS2421: Property 'foo' is missing in type 'D'.
|
||||
!!! error TS2420: Class 'D' incorrectly implements interface 'I'.
|
||||
!!! error TS2420: Property 'foo' is missing in type 'D'.
|
||||
baz() { }
|
||||
bat() { }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2418: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape':
|
||||
Types of property 'Utils' are incompatible:
|
||||
Type 'typeof Utils' is not assignable to type 'typeof Utils':
|
||||
tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'.
|
||||
Types of property 'Utils' are incompatible.
|
||||
Type 'typeof Utils' is not assignable to type 'typeof Utils'.
|
||||
Property 'convert' is missing in type 'typeof Utils'.
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ tests/cases/compiler/clodulesDerivedClasses.ts(9,7): error TS2418: Class static
|
||||
|
||||
class Path extends Shape {
|
||||
~~~~
|
||||
!!! error TS2418: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape':
|
||||
!!! error TS2418: Types of property 'Utils' are incompatible:
|
||||
!!! error TS2418: Type 'typeof Utils' is not assignable to type 'typeof Utils':
|
||||
!!! error TS2418: Property 'convert' is missing in type 'typeof Utils'.
|
||||
!!! error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'.
|
||||
!!! error TS2417: Types of property 'Utils' are incompatible.
|
||||
!!! error TS2417: Type 'typeof Utils' is not assignable to type 'typeof Utils'.
|
||||
!!! error TS2417: Property 'convert' is missing in type 'typeof Utils'.
|
||||
name: string;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(5,1): error TS2323: Type 'string' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(8,1): error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(11,1): error TS2323: Type 'string' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(14,1): error TS2322: Type 'string' is not assignable to type '{ a: string; }':
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(14,1): error TS2323: Type 'string' is not assignable to type '{ a: string; }'.
|
||||
Property 'a' is missing in type 'String'.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(17,1): error TS2323: Type 'string' is not assignable to type 'void'.
|
||||
|
||||
@@ -28,8 +28,8 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmen
|
||||
var x4: {a: string};
|
||||
x4 += '';
|
||||
~~
|
||||
!!! error TS2322: Type 'string' is not assignable to type '{ a: string; }':
|
||||
!!! error TS2322: Property 'a' is missing in type 'String'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type '{ a: string; }'.
|
||||
!!! error TS2323: Property 'a' is missing in type 'String'.
|
||||
|
||||
var x5: void;
|
||||
x5 += '';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2322: Type 'string | number' is not assignable to type 'boolean':
|
||||
tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2323: Type 'string | number' is not assignable to type 'boolean'.
|
||||
Type 'string' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/conditionalExpression1.ts (1 errors) ====
|
||||
var x: boolean = (true ? 1 : ""); // should be an error
|
||||
~
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'boolean':
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type 'string | number' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'boolean'.
|
||||
@@ -1,17 +1,17 @@
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(15,5): error TS2322: Type 'A | B' is not assignable to type 'A':
|
||||
Type 'B' is not assignable to type 'A':
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(15,5): error TS2323: Type 'A | B' is not assignable to type 'A'.
|
||||
Type 'B' is not assignable to type 'A'.
|
||||
Property 'propertyA' is missing in type 'B'.
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(16,5): error TS2322: Type 'A | B' is not assignable to type 'B':
|
||||
Type 'A' is not assignable to type 'B':
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(16,5): error TS2323: Type 'A | B' is not assignable to type 'B'.
|
||||
Type 'A' is not assignable to type 'B'.
|
||||
Property 'propertyB' is missing in type 'A'.
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(18,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number':
|
||||
Type '(n: X) => string' is not assignable to type '(t: X) => number':
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(18,5): error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number'.
|
||||
Type '(n: X) => string' is not assignable to type '(t: X) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(19,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string':
|
||||
Type '(m: X) => number' is not assignable to type '(t: X) => string':
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(19,5): error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string'.
|
||||
Type '(m: X) => number' is not assignable to type '(t: X) => string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(20,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean':
|
||||
Type '(m: X) => number' is not assignable to type '(t: X) => boolean':
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(20,5): error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean'.
|
||||
Type '(m: X) => number' is not assignable to type '(t: X) => boolean'.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
@@ -32,27 +32,27 @@ tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithou
|
||||
//Be contextually typed and and bct is not identical, results in errors that union type is not assignable to target
|
||||
var result2: A = true ? a : b;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'A | B' is not assignable to type 'A':
|
||||
!!! error TS2322: Type 'B' is not assignable to type 'A':
|
||||
!!! error TS2322: Property 'propertyA' is missing in type 'B'.
|
||||
!!! error TS2323: Type 'A | B' is not assignable to type 'A'.
|
||||
!!! error TS2323: Type 'B' is not assignable to type 'A'.
|
||||
!!! error TS2323: Property 'propertyA' is missing in type 'B'.
|
||||
var result3: B = true ? a : b;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'A | B' is not assignable to type 'B':
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B':
|
||||
!!! error TS2322: Property 'propertyB' is missing in type 'A'.
|
||||
!!! error TS2323: Type 'A | B' is not assignable to type 'B'.
|
||||
!!! error TS2323: Type 'A' is not assignable to type 'B'.
|
||||
!!! error TS2323: Property 'propertyB' is missing in type 'A'.
|
||||
|
||||
var result4: (t: X) => number = true ? (m) => m.propertyX1 : (n) => n.propertyX2;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number':
|
||||
!!! error TS2322: Type '(n: X) => string' is not assignable to type '(t: X) => number':
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number'.
|
||||
!!! error TS2323: Type '(n: X) => string' is not assignable to type '(t: X) => number'.
|
||||
!!! error TS2323: Type 'string' is not assignable to type 'number'.
|
||||
var result5: (t: X) => string = true ? (m) => m.propertyX1 : (n) => n.propertyX2;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string':
|
||||
!!! error TS2322: Type '(m: X) => number' is not assignable to type '(t: X) => string':
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string'.
|
||||
!!! error TS2323: Type '(m: X) => number' is not assignable to type '(t: X) => string'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
var result6: (t: X) => boolean = true ? (m) => m.propertyX1 : (n) => n.propertyX2;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean':
|
||||
!!! error TS2322: Type '(m: X) => number' is not assignable to type '(t: X) => boolean':
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2323: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean'.
|
||||
!!! error TS2323: Type '(m: X) => number' is not assignable to type '(t: X) => boolean'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'boolean'.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D':
|
||||
tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D'.
|
||||
Named properties 'm' of types 'B' and 'D' are not identical.
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Inte
|
||||
|
||||
interface E extends B { } // Error here for extending B and D
|
||||
~
|
||||
!!! error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D':
|
||||
!!! error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D'.
|
||||
!!! error TS2320: Named properties 'm' of types 'B' and 'D' are not identical.
|
||||
interface E extends D { } // No duplicate error here
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/constraints0.ts(14,9): error TS2343: Type 'B' does not satisfy the constraint 'A':
|
||||
tests/cases/compiler/constraints0.ts(14,9): error TS2344: Type 'B' does not satisfy the constraint 'A'.
|
||||
Property 'a' is missing in type 'B'.
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ tests/cases/compiler/constraints0.ts(14,9): error TS2343: Type 'B' does not sati
|
||||
var v1: C<A>; // should work
|
||||
var v2: C<B>; // should not work
|
||||
~~~~
|
||||
!!! error TS2343: Type 'B' does not satisfy the constraint 'A':
|
||||
!!! error TS2343: Property 'a' is missing in type 'B'.
|
||||
!!! error TS2344: Type 'B' does not satisfy the constraint 'A'.
|
||||
!!! error TS2344: Property 'a' is missing in type 'B'.
|
||||
|
||||
var y = v1.x.a; // 'a' should be of type 'number'
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts(61,15): error TS2429: Interface 'I2' incorrectly extends interface 'Base2':
|
||||
Types of property 'a' are incompatible:
|
||||
Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number':
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts(61,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
Types of property 'a' are incompatible.
|
||||
Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -67,10 +67,10 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc
|
||||
// S's
|
||||
interface I2 extends Base2 {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2':
|
||||
!!! error TS2429: Types of property 'a' are incompatible:
|
||||
!!! error TS2429: Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number':
|
||||
!!! error TS2429: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
!!! error TS2430: Types of property 'a' are incompatible.
|
||||
!!! error TS2430: Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number'.
|
||||
!!! error TS2430: Type 'string' is not assignable to type 'number'.
|
||||
// N's
|
||||
a: new (x: number) => string; // error because base returns non-void;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(41,19): error TS2429: Interface 'I2<T, U>' incorrectly extends interface 'A':
|
||||
Types of property 'a2' are incompatible:
|
||||
Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]':
|
||||
Types of parameters 'x' and 'x' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(41,19): error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
Types of property 'a2' are incompatible.
|
||||
Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(50,19): error TS2429: Interface 'I4' incorrectly extends interface 'A':
|
||||
Types of property 'a8' are incompatible:
|
||||
Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
Types of parameters 'y' and 'y' are incompatible:
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
Types of property 'foo' are incompatible:
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(50,19): error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
Types of property 'a8' are incompatible.
|
||||
Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -57,11 +57,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc
|
||||
|
||||
interface I2<T, U> extends A {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I2<T, U>' incorrectly extends interface 'A':
|
||||
!!! error TS2429: Types of property 'a2' are incompatible:
|
||||
!!! error TS2429: Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]':
|
||||
!!! error TS2429: Types of parameters 'x' and 'x' are incompatible:
|
||||
!!! error TS2429: Type 'T' is not assignable to type 'number'.
|
||||
!!! error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a2' are incompatible.
|
||||
!!! error TS2430: Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]'.
|
||||
!!! error TS2430: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2430: Type 'T' is not assignable to type 'number'.
|
||||
a2: new (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic
|
||||
}
|
||||
|
||||
@@ -72,15 +72,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc
|
||||
|
||||
interface I4 extends A {
|
||||
~~
|
||||
!!! error TS2429: Interface 'I4' incorrectly extends interface 'A':
|
||||
!!! error TS2429: Types of property 'a8' are incompatible:
|
||||
!!! error TS2429: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived':
|
||||
!!! error TS2429: Types of parameters 'y' and 'y' are incompatible:
|
||||
!!! error TS2429: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived':
|
||||
!!! error TS2429: Types of parameters 'arg2' and 'arg2' are incompatible:
|
||||
!!! error TS2429: Type '{ foo: number; }' is not assignable to type 'Base':
|
||||
!!! error TS2429: Types of property 'foo' are incompatible:
|
||||
!!! error TS2429: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a8' are incompatible.
|
||||
!!! error TS2430: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2430: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2430: Types of property 'foo' are incompatible.
|
||||
!!! error TS2430: Type 'number' is not assignable to type 'string'.
|
||||
a8: new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(3,5): error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]':
|
||||
Types of property 'pop' are incompatible:
|
||||
Type '() => string | number | boolean' is not assignable to type '() => string | number':
|
||||
Type 'string | number | boolean' is not assignable to type 'string | number':
|
||||
Type 'boolean' is not assignable to type 'string | number':
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(3,5): error TS2323: Type '[number, string, boolean]' is not assignable to type '[number, string]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number | boolean' is not assignable to type '() => string | number'.
|
||||
Type 'string | number | boolean' is not assignable to type 'string | number'.
|
||||
Type 'boolean' is not assignable to type 'string | number'.
|
||||
Type 'boolean' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(8,1): error TS2323: Type '[number, string, boolean]' is not assignable to type '[number, string]'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(11,1): error TS2322: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]':
|
||||
Types of property '0' are incompatible:
|
||||
Type '{}' is not assignable to type '{ a: string; }':
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(11,1): error TS2323: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]'.
|
||||
Types of property '0' are incompatible.
|
||||
Type '{}' is not assignable to type '{ a: string; }'.
|
||||
Property 'a' is missing in type '{}'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(12,1): error TS2322: Type '[number, string]' is not assignable to type '[number, string, boolean]':
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(12,1): error TS2323: Type '[number, string]' is not assignable to type '[number, string, boolean]'.
|
||||
Property '2' is missing in type '[number, string]'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS2322: Type '[string, string, number]' is not assignable to type '[string, string]':
|
||||
Types of property 'pop' are incompatible:
|
||||
Type '() => string | number' is not assignable to type '() => string':
|
||||
Type 'string | number' is not assignable to type 'string':
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS2323: Type '[string, string, number]' is not assignable to type '[string, string]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number' is not assignable to type '() => string'.
|
||||
Type 'string | number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS23
|
||||
var numStrTuple: [number, string] = [5, "hello"];
|
||||
var numStrTuple2: [number, string] = [5, "foo", true];
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]':
|
||||
!!! error TS2322: Types of property 'pop' are incompatible:
|
||||
!!! error TS2322: Type '() => string | number | boolean' is not assignable to type '() => string | number':
|
||||
!!! error TS2322: Type 'string | number | boolean' is not assignable to type 'string | number':
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string | number':
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
!!! error TS2323: Type '[number, string, boolean]' is not assignable to type '[number, string]'.
|
||||
!!! error TS2323: Types of property 'pop' are incompatible.
|
||||
!!! error TS2323: Type '() => string | number | boolean' is not assignable to type '() => string | number'.
|
||||
!!! error TS2323: Type 'string | number | boolean' is not assignable to type 'string | number'.
|
||||
!!! error TS2323: Type 'boolean' is not assignable to type 'string | number'.
|
||||
!!! error TS2323: Type 'boolean' is not assignable to type 'number'.
|
||||
var numStrBoolTuple: [number, string, boolean] = [5, "foo", true];
|
||||
var objNumTuple: [{ a: string }, number] = [{ a: "world" }, 5];
|
||||
var strTupleTuple: [string, [number, {}]] = ["bar", [5, { x: 1, y: 1 }]];
|
||||
@@ -40,19 +40,19 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(13,5): error TS23
|
||||
// error
|
||||
objNumTuple = [ {}, 5];
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2322: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]':
|
||||
!!! error TS2322: Types of property '0' are incompatible:
|
||||
!!! error TS2322: Type '{}' is not assignable to type '{ a: string; }':
|
||||
!!! error TS2322: Property 'a' is missing in type '{}'.
|
||||
!!! error TS2323: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]'.
|
||||
!!! error TS2323: Types of property '0' are incompatible.
|
||||
!!! error TS2323: Type '{}' is not assignable to type '{ a: string; }'.
|
||||
!!! error TS2323: Property 'a' is missing in type '{}'.
|
||||
numStrBoolTuple = numStrTuple;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '[number, string]' is not assignable to type '[number, string, boolean]':
|
||||
!!! error TS2322: Property '2' is missing in type '[number, string]'.
|
||||
!!! error TS2323: Type '[number, string]' is not assignable to type '[number, string, boolean]'.
|
||||
!!! error TS2323: Property '2' is missing in type '[number, string]'.
|
||||
var strStrTuple: [string, string] = ["foo", "bar", 5];
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2322: Type '[string, string, number]' is not assignable to type '[string, string]':
|
||||
!!! error TS2322: Types of property 'pop' are incompatible:
|
||||
!!! error TS2322: Type '() => string | number' is not assignable to type '() => string':
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'string':
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type '[string, string, number]' is not assignable to type '[string, string]'.
|
||||
!!! error TS2323: Types of property 'pop' are incompatible.
|
||||
!!! error TS2323: Type '() => string | number' is not assignable to type '() => string'.
|
||||
!!! error TS2323: Type 'string | number' is not assignable to type 'string'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient.
|
||||
tests/cases/compiler/contextualTyping.ts(197,15): error TS2300: Duplicate identifier 'Point'.
|
||||
tests/cases/compiler/contextualTyping.ts(207,10): error TS2300: Duplicate identifier 'Point'.
|
||||
tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'.
|
||||
tests/cases/compiler/contextualTyping.ts(230,5): error TS2323: Type '{}' is not assignable to type 'B'.\n Property 'x' is missing in type '{}'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping.ts (4 errors) ====
|
||||
@@ -242,5 +242,5 @@ tests/cases/compiler/contextualTyping.ts(230,5): error TS2322: Type '{}' is not
|
||||
interface B extends A { }
|
||||
var x: B = { };
|
||||
~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'.
|
||||
!!! error TS2323: Type '{}' is not assignable to type 'B'.\n Property 'x' is missing in type '{}'.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/contextualTyping11.ts(1,13): error TS2322: Type 'foo[]' is not assignable to type '{ id: number; }[]':
|
||||
Type 'foo' is not assignable to type '{ id: number; }':
|
||||
tests/cases/compiler/contextualTyping11.ts(1,13): error TS2323: Type 'foo[]' is not assignable to type '{ id: number; }[]'.
|
||||
Type 'foo' is not assignable to type '{ id: number; }'.
|
||||
Property 'id' is missing in type 'foo'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping11.ts (1 errors) ====
|
||||
class foo { public bar:{id:number;}[] = [<foo>({})]; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'foo[]' is not assignable to type '{ id: number; }[]':
|
||||
!!! error TS2322: Type 'foo' is not assignable to type '{ id: number; }':
|
||||
!!! error TS2322: Property 'id' is missing in type 'foo'.
|
||||
!!! error TS2323: Type 'foo[]' is not assignable to type '{ id: number; }[]'.
|
||||
!!! error TS2323: Type 'foo' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2323: Property 'id' is missing in type 'foo'.
|
||||
@@ -1,13 +1,13 @@
|
||||
tests/cases/compiler/contextualTyping21.ts(1,36): error TS2322: Type '(number | { id: number; })[]' is not assignable to type '{ id: number; }[]':
|
||||
Type 'number | { id: number; }' is not assignable to type '{ id: number; }':
|
||||
Type 'number' is not assignable to type '{ id: number; }':
|
||||
tests/cases/compiler/contextualTyping21.ts(1,36): error TS2323: Type '(number | { id: number; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
Type 'number | { id: number; }' is not assignable to type '{ id: number; }'.
|
||||
Type 'number' is not assignable to type '{ id: number; }'.
|
||||
Property 'id' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping21.ts (1 errors) ====
|
||||
var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, 1];
|
||||
~~~
|
||||
!!! error TS2322: Type '(number | { id: number; })[]' is not assignable to type '{ id: number; }[]':
|
||||
!!! error TS2322: Type 'number | { id: number; }' is not assignable to type '{ id: number; }':
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ id: number; }':
|
||||
!!! error TS2322: Property 'id' is missing in type 'Number'.
|
||||
!!! error TS2323: Type '(number | { id: number; })[]' is not assignable to type '{ id: number; }[]'.
|
||||
!!! error TS2323: Type 'number | { id: number; }' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2323: Type 'number' is not assignable to type '{ id: number; }'.
|
||||
!!! error TS2323: Property 'id' is missing in type 'Number'.
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/contextualTyping24.ts(1,55): error TS2322: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number':
|
||||
Types of parameters 'a' and 'a' are incompatible:
|
||||
tests/cases/compiler/contextualTyping24.ts(1,55): error TS2323: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number'.
|
||||
Types of parameters 'a' and 'a' are incompatible.
|
||||
Type 'string' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping24.ts (1 errors) ====
|
||||
var foo:(a:{():number; (i:number):number; })=>number; foo = function(a:string){return 5};
|
||||
~~~
|
||||
!!! error TS2322: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number':
|
||||
!!! error TS2322: Types of parameters 'a' and 'a' are incompatible:
|
||||
!!! error TS2322: Type 'string' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
!!! error TS2323: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number'.
|
||||
!!! error TS2323: Types of parameters 'a' and 'a' are incompatible.
|
||||
!!! error TS2323: Type 'string' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/contextualTyping30.ts(1,37): error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'.
|
||||
Type 'string | number' is not assignable to type 'number':
|
||||
Type 'string | number' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -7,5 +7,5 @@ tests/cases/compiler/contextualTyping30.ts(1,37): error TS2345: Argument of type
|
||||
function foo(param:number[]){}; foo([1, "a"]);
|
||||
~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'.
|
||||
!!! error TS2345: Type 'string | number' is not assignable to type 'number':
|
||||
!!! error TS2345: Type 'string | number' is not assignable to type 'number'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user