mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-12 20:01:02 -05:00
Accepted baselines.
This commit is contained in:
@@ -1,5 +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"'.
|
||||
Property 'someClass' is missing in type 'Number'.
|
||||
tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2322: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -9,7 +8,6 @@ tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2322: Type 'typeof "tes
|
||||
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'.
|
||||
var y = 1;
|
||||
y = moduleA; // should be error
|
||||
~
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts (1 errors) ====
|
||||
@@ -8,5 +7,4 @@ tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS
|
||||
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'.
|
||||
}
|
||||
@@ -26,10 +26,13 @@ tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is
|
||||
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'.
|
||||
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'.
|
||||
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'.
|
||||
Property 'CM3M1' is missing in type 'I1'.
|
||||
tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2322: 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[]'.
|
||||
@@ -159,14 +162,17 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is n
|
||||
~~~~~~
|
||||
!!! 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'.
|
||||
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'.
|
||||
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'.
|
||||
|
||||
arr_any = f1; // should be an error - is
|
||||
~~~~~~~
|
||||
|
||||
@@ -18,7 +18,6 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error
|
||||
Types of parameters 'items' and 'items' are incompatible.
|
||||
Type 'number | string' is not assignable to type 'Number'.
|
||||
Type 'string' is not assignable to type 'Number'.
|
||||
Property 'toFixed' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts (6 errors) ====
|
||||
@@ -82,5 +81,4 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error
|
||||
!!! error TS2322: Types of parameters 'items' and 'items' are incompatible.
|
||||
!!! error TS2322: Type 'number | string' is not assignable to type 'Number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Number'.
|
||||
!!! error TS2322: Property 'toFixed' is missing in type 'String'.
|
||||
|
||||
@@ -4,7 +4,6 @@ tests/cases/compiler/arraySigChecking.ts(18,5): error TS2322: Type 'void[]' is n
|
||||
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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/arraySigChecking.ts (3 errors) ====
|
||||
@@ -39,7 +38,6 @@ tests/cases/compiler/arraySigChecking.ts(22,1): error TS2322: Type 'number[][]'
|
||||
!!! 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'.
|
||||
|
||||
function isEmpty(l: { length: number }) {
|
||||
return l.length === 0;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'.
|
||||
Property 'isArray' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,22): error TS1005: '=' expected.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,30): error TS1109: Expression expected.
|
||||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,5): error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'.
|
||||
@@ -16,7 +15,6 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(
|
||||
var xs3: typeof Array<number>;
|
||||
~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'.
|
||||
!!! error TS2322: Property 'isArray' is missing in type 'Number'.
|
||||
~
|
||||
!!! error TS1005: '=' expected.
|
||||
~
|
||||
|
||||
@@ -3,9 +3,7 @@ tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2322: Type '{ [index: st
|
||||
tests/cases/compiler/assignmentCompat1.ts(6,1): error TS2322: Type '{ [index: number]: any; }' is not assignable to type '{ one: number; }'.
|
||||
Property 'one' is missing in type '{ [index: number]: any; }'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(8,1): error TS2322: Type 'string' is not assignable to type '{ [index: string]: any; }'.
|
||||
Index signature is missing in type 'String'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(10,1): error TS2322: Type 'boolean' is not assignable to type '{ [index: number]: any; }'.
|
||||
Index signature is missing in type 'Boolean'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompat1.ts (4 errors) ====
|
||||
@@ -25,11 +23,9 @@ tests/cases/compiler/assignmentCompat1.ts(10,1): error TS2322: Type 'boolean' is
|
||||
y = "foo"; // Error
|
||||
~
|
||||
!!! error TS2322: Type 'string' is not assignable to type '{ [index: string]: any; }'.
|
||||
!!! error TS2322: Index signature is missing in type 'String'.
|
||||
z = "foo"; // OK, string has numeric indexer
|
||||
z = false; // Error
|
||||
~
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type '{ [index: number]: any; }'.
|
||||
!!! error TS2322: Index signature is missing in type 'Boolean'.
|
||||
|
||||
|
||||
@@ -3,9 +3,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
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.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts (2 errors) ====
|
||||
@@ -67,11 +73,17 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! 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'.
|
||||
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'.
|
||||
|
||||
|
||||
var b10: <T extends Derived>(...x: T[]) => T;
|
||||
|
||||
@@ -3,9 +3,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
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.
|
||||
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.
|
||||
Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
@@ -13,6 +19,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
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.
|
||||
Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(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.
|
||||
Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
@@ -20,6 +27,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
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.
|
||||
Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'.
|
||||
Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' provides no match for the signature '(a: any): any'
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts (6 errors) ====
|
||||
@@ -81,11 +89,17 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! 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'.
|
||||
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'.
|
||||
|
||||
|
||||
var b10: new <T extends Derived>(...x: T[]) => T;
|
||||
@@ -120,6 +134,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! 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 TS2322: Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any'
|
||||
|
||||
var b17: new <T>(x: (a: T) => T) => any[];
|
||||
a17 = b17; // error
|
||||
@@ -133,6 +148,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! 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 TS2322: Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' provides no match for the signature '(a: any): any'
|
||||
}
|
||||
|
||||
module WithGenericSignaturesInBaseType {
|
||||
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability16.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'number' is not assignable to type 'any[]'.
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability17.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'string' is not assignable to type 'any[]'.
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability18.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'number' is not assignable to type 'number[]'.
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability19.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'string' is not assignable to type 'number[]'.
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability20.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'number' is not assignable to type 'string[]'.
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability21.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'string' is not assignable to type 'string[]'.
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability22.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'number' is not assignable to type 'boolean[]'.
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability23.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'string' is not assignable to type 'boolean[]'.
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability29.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'number' is not assignable to type 'any[]'.
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability30.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'number' is not assignable to type 'number[]'.
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability31.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'number' is not assignable to type 'string[]'.
|
||||
@@ -1,7 +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[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatability32.ts (1 errors) ====
|
||||
@@ -17,5 +16,4 @@ tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'inte
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! 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 TS2322: Type 'number' is not assignable to type 'boolean[]'.
|
||||
@@ -1,9 +1,7 @@
|
||||
tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2322: 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'.
|
||||
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'.
|
||||
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'.
|
||||
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'.
|
||||
@@ -26,7 +24,6 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-functi
|
||||
x = '';
|
||||
~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Applicable'.
|
||||
!!! error TS2322: Property 'apply' is missing in type 'String'.
|
||||
x = [''];
|
||||
~
|
||||
!!! error TS2322: Type 'string[]' is not assignable to type 'Applicable'.
|
||||
@@ -34,7 +31,6 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-functi
|
||||
x = 4;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Applicable'.
|
||||
!!! error TS2322: Property 'apply' is missing in type 'Number'.
|
||||
x = {};
|
||||
~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Applicable'.
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2322: 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'.
|
||||
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'.
|
||||
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'.
|
||||
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'.
|
||||
@@ -26,7 +24,6 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-functio
|
||||
x = '';
|
||||
~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Callable'.
|
||||
!!! error TS2322: Property 'call' is missing in type 'String'.
|
||||
x = [''];
|
||||
~
|
||||
!!! error TS2322: Type 'string[]' is not assignable to type 'Callable'.
|
||||
@@ -34,7 +31,6 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-functio
|
||||
x = 4;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Callable'.
|
||||
!!! error TS2322: Property 'call' is missing in type 'Number'.
|
||||
x = {};
|
||||
~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Callable'.
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
tests/cases/compiler/booleanAssignment.ts(2,1): error TS2322: Type 'number' is not assignable to type 'Boolean'.
|
||||
Types of property 'valueOf' are incompatible.
|
||||
Type '() => number' is not assignable to type '() => boolean'.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
tests/cases/compiler/booleanAssignment.ts(3,1): error TS2322: Type 'string' is not assignable to type 'Boolean'.
|
||||
Types of property 'valueOf' are incompatible.
|
||||
Type '() => string' is not assignable to type '() => boolean'.
|
||||
Type 'string' is not assignable to type 'boolean'.
|
||||
tests/cases/compiler/booleanAssignment.ts(4,1): error TS2322: Type '{}' is not assignable to type 'Boolean'.
|
||||
Types of property 'valueOf' are incompatible.
|
||||
Type '() => Object' is not assignable to type '() => boolean'.
|
||||
@@ -17,15 +11,9 @@ tests/cases/compiler/booleanAssignment.ts(4,1): error TS2322: Type '{}' is not a
|
||||
b = 1; // Error
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Boolean'.
|
||||
!!! error TS2322: Types of property 'valueOf' are incompatible.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type '() => boolean'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
b = "a"; // Error
|
||||
~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Boolean'.
|
||||
!!! error TS2322: Types of property 'valueOf' are incompatible.
|
||||
!!! error TS2322: Type '() => string' is not assignable to type '() => boolean'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
|
||||
b = {}; // Error
|
||||
~
|
||||
!!! error TS2322: Type '{}' is not assignable to type 'Boolean'.
|
||||
|
||||
@@ -10,6 +10,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign
|
||||
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/callSignatureAssignabilityInInheritance3.ts (2 errors) ====
|
||||
@@ -87,6 +89,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign
|
||||
!!! 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
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmen
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(8,1): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(11,1): error TS2322: 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; }'.
|
||||
Property 'a' is missing in type 'String'.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmentLHSCannotBeAssigned.ts(17,1): error TS2322: Type 'string' is not assignable to type 'void'.
|
||||
|
||||
|
||||
@@ -29,7 +28,6 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAdditionAssignmen
|
||||
x4 += '';
|
||||
~~
|
||||
!!! error TS2322: Type 'string' is not assignable to type '{ a: string; }'.
|
||||
!!! error TS2322: Property 'a' is missing in type 'String'.
|
||||
|
||||
var x5: void;
|
||||
x5 += '';
|
||||
|
||||
@@ -10,6 +10,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc
|
||||
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/constructSignatureAssignabilityInInheritance3.ts (2 errors) ====
|
||||
@@ -77,6 +79,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc
|
||||
!!! 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,5 +1,4 @@
|
||||
tests/cases/compiler/constructorReturnsInvalidType.ts(3,16): error TS2322: Type 'number' is not assignable to type 'X'.
|
||||
Property 'foo' is missing in type 'Number'.
|
||||
tests/cases/compiler/constructorReturnsInvalidType.ts(3,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
|
||||
|
||||
@@ -9,7 +8,6 @@ tests/cases/compiler/constructorReturnsInvalidType.ts(3,16): error TS2409: Retur
|
||||
return 1;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'X'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'Number'.
|
||||
~
|
||||
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(12,16): error TS2322: Type 'number' is not assignable to type 'D'.
|
||||
Property 'x' is missing in type 'Number'.
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(12,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(26,16): error TS2322: Type '{ x: number; }' is not assignable to type 'F<T>'.
|
||||
Types of property 'x' are incompatible.
|
||||
@@ -22,7 +21,6 @@ tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignabl
|
||||
return 1; // error
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'x' is missing in type 'Number'.
|
||||
~
|
||||
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/contextualTyping21.ts(1,36): error TS2322: Type '({ id: number; } | number)[]' is not assignable to type '{ id: number; }[]'.
|
||||
Type '{ id: number; } | 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) ====
|
||||
@@ -9,5 +8,4 @@ tests/cases/compiler/contextualTyping21.ts(1,36): error TS2322: Type '({ id: num
|
||||
~~~
|
||||
!!! error TS2322: Type '({ id: number; } | number)[]' is not assignable to type '{ id: number; }[]'.
|
||||
!!! error TS2322: Type '{ id: number; } | 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 TS2322: Type 'number' is not assignable to type '{ id: number; }'.
|
||||
@@ -1,6 +1,7 @@
|
||||
tests/cases/compiler/contextualTyping33.ts(1,66): error TS2345: Argument of type '((() => number) | (() => string))[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'.
|
||||
Type '(() => number) | (() => string)' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
Type '() => string' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping33.ts (1 errors) ====
|
||||
@@ -8,4 +9,5 @@ tests/cases/compiler/contextualTyping33.ts(1,66): error TS2345: Argument of type
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '((() => number) | (() => string))[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'.
|
||||
!!! error TS2345: Type '(() => number) | (() => string)' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
!!! error TS2345: Type '() => string' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
!!! error TS2345: Type '() => string' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
@@ -2,7 +2,6 @@ tests/cases/compiler/contextualTypingOfArrayLiterals1.ts(5,5): error TS2322: Typ
|
||||
Index signatures are incompatible.
|
||||
Type 'Date | number' is not assignable to type 'Date'.
|
||||
Type 'number' is not assignable to type 'Date'.
|
||||
Property 'toDateString' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTypingOfArrayLiterals1.ts (1 errors) ====
|
||||
@@ -16,7 +15,6 @@ tests/cases/compiler/contextualTypingOfArrayLiterals1.ts(5,5): error TS2322: Typ
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'Date | number' is not assignable to type 'Date'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Date'.
|
||||
!!! error TS2322: Property 'toDateString' is missing in type 'Number'.
|
||||
var r2 = x3[1];
|
||||
r2.getDate();
|
||||
|
||||
@@ -2,7 +2,6 @@ tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS
|
||||
Type '(b: number) => void' is not assignable to type '(a: A) => void'.
|
||||
Types of parameters 'b' and 'a' are incompatible.
|
||||
Type 'number' is not assignable to type 'A'.
|
||||
Property 'foo' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTypingOfConditionalExpression2.ts (1 errors) ====
|
||||
@@ -22,5 +21,4 @@ tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS
|
||||
!!! error TS2322: Type '(b: number) => void' is not assignable to type '(a: A) => void'.
|
||||
!!! error TS2322: Types of parameters 'b' and 'a' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'A'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'Number'.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts(16,32): error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'.
|
||||
Type 'string' is not assignable to type 'Date'.
|
||||
Property 'toDateString' is missing in type 'String'.
|
||||
tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts(17,32): error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'.
|
||||
Type 'string' is not assignable to type 'Date'.
|
||||
|
||||
@@ -25,7 +24,6 @@ tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts(17,32):
|
||||
~
|
||||
!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Property 'toDateString' is missing in type 'String'.
|
||||
var r6 = _.forEach<number>(c2, (x) => { return x.toFixed() });
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'.
|
||||
|
||||
@@ -5,7 +5,6 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
|
||||
Types of property '1' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(17,6): error TS2322: Type 'string' is not assignable to type 'Number'.
|
||||
Property 'toFixed' is missing in type 'String'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(22,5): error TS2322: Type 'number[]' is not assignable to type '[number, number]'.
|
||||
Property '0' is missing in type 'number[]'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(23,5): error TS2322: Type 'number[]' is not assignable to type '[string, string]'.
|
||||
@@ -43,7 +42,6 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
|
||||
var [b3 = "string", b4, b5] = bar(); // Error
|
||||
~~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'Number'.
|
||||
!!! error TS2322: Property 'toFixed' is missing in type 'String'.
|
||||
|
||||
// V is an array assignment pattern, S is the type Any or an array-like type (section 3.3.2), and, for each assignment element E in V,
|
||||
// S is not a tuple- like type and the numeric index signature type of S is assignable to the target given in E.
|
||||
|
||||
@@ -8,7 +8,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(
|
||||
Type 'number | string[][] | string' is not assignable to type 'number | string[][]'.
|
||||
Type 'string' is not assignable to type 'number | string[][]'.
|
||||
Type 'string' is not assignable to type 'string[][]'.
|
||||
Property 'push' is missing in type 'String'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(16,8): error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(16,16): error TS2371: A parameter initializer is only allowed in a function or constructor implementation.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(23,14): error TS2345: Argument of type '{ x: string; y: boolean; }' is not assignable to parameter of type '{ x: number; y: any; }'.
|
||||
@@ -34,7 +33,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(39,4): error TS2345: Argument of type '[number, number, boolean, boolean]' is not assignable to parameter of type '[any, any, [[any]]]'.
|
||||
Types of property '2' are incompatible.
|
||||
Type 'boolean' is not assignable to type '[[any]]'.
|
||||
Property '0' is missing in type 'Boolean'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(40,4): error TS2345: Argument of type '[number, number, [[string]]]' is not assignable to parameter of type '[any, any, [[number]]]'.
|
||||
Types of property '2' are incompatible.
|
||||
Type '[[string]]' is not assignable to type '[[number]]'.
|
||||
@@ -78,7 +76,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(
|
||||
!!! error TS2345: Type 'number | string[][] | string' is not assignable to type 'number | string[][]'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number | string[][]'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'string[][]'.
|
||||
!!! error TS2345: Property 'push' is missing in type 'String'.
|
||||
|
||||
|
||||
// If the declaration includes an initializer expression (which is permitted only
|
||||
@@ -146,7 +143,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(
|
||||
!!! error TS2345: Argument of type '[number, number, boolean, boolean]' is not assignable to parameter of type '[any, any, [[any]]]'.
|
||||
!!! error TS2345: Types of property '2' are incompatible.
|
||||
!!! error TS2345: Type 'boolean' is not assignable to type '[[any]]'.
|
||||
!!! error TS2345: Property '0' is missing in type 'Boolean'.
|
||||
c6([1, 2, [["string"]]]); // Error, implied type is [any, any, [[number]]] // Use initializer
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '[number, number, [[string]]]' is not assignable to parameter of type '[any, any, [[number]]]'.
|
||||
|
||||
@@ -6,7 +6,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(22,4): error TS2345: Argument of type '[number, number, string, boolean, boolean]' is not assignable to parameter of type '[any, any, [[any]]]'.
|
||||
Types of property '2' are incompatible.
|
||||
Type 'string' is not assignable to type '[[any]]'.
|
||||
Property '0' is missing in type 'String'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(23,4): error TS2345: Argument of type '[number, number]' is not assignable to parameter of type '[any, any, [[any]]]'.
|
||||
Property '2' is missing in type '[number, number]'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(24,4): error TS2345: Argument of type '(number | string)[]' is not assignable to parameter of type 'number[]'.
|
||||
@@ -53,7 +52,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(
|
||||
!!! error TS2345: Argument of type '[number, number, string, boolean, boolean]' is not assignable to parameter of type '[any, any, [[any]]]'.
|
||||
!!! error TS2345: Types of property '2' are incompatible.
|
||||
!!! error TS2345: Type 'string' is not assignable to type '[[any]]'.
|
||||
!!! error TS2345: Property '0' is missing in type 'String'.
|
||||
a5([1, 2]); // Error, parameter type is [any, any, [[any]]]
|
||||
~~~~~~
|
||||
!!! error TS2345: Argument of type '[number, number]' is not assignable to parameter of type '[any, any, [[any]]]'.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(47,4): error TS2345: Argument of type '{ y: Class; }' is not assignable to parameter of type '{ y: D; }'.
|
||||
Types of property 'y' are incompatible.
|
||||
Type 'Class' is not assignable to type 'D'.
|
||||
Property 'foo' is missing in type 'Class'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(48,4): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ y: D; }'.
|
||||
Property 'y' is missing in type '{}'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(49,4): error TS2345: Argument of type '{ y: number; }' is not assignable to parameter of type '{ y: D; }'.
|
||||
@@ -63,6 +64,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration5.ts(
|
||||
!!! error TS2345: Argument of type '{ y: Class; }' is not assignable to parameter of type '{ y: D; }'.
|
||||
!!! error TS2345: Types of property 'y' are incompatible.
|
||||
!!! error TS2345: Type 'Class' is not assignable to type 'D'.
|
||||
!!! error TS2345: Property 'foo' is missing in type 'Class'.
|
||||
d3({});
|
||||
~~
|
||||
!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{ y: D; }'.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(1,5): error TS2322: Type 'number' is not assignable to type '{ (): any; x: number; }'.
|
||||
Property 'x' is missing in type 'Number'.
|
||||
tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(3,6): error TS1139: Type parameter declaration expected.
|
||||
tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(4,1): error TS1109: Expression expected.
|
||||
|
||||
@@ -8,7 +7,6 @@ tests/cases/compiler/dontShowCompilerGeneratedMembers.ts(4,1): error TS1109: Exp
|
||||
var f: {
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (): any; x: number; }'.
|
||||
!!! error TS2322: Property 'x' is missing in type 'Number'.
|
||||
x: number;
|
||||
<-
|
||||
~
|
||||
|
||||
@@ -3,23 +3,16 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(29,9): error TS2322: Type 'E' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(30,9): error TS2322: Type 'E' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(31,9): error TS2322: Type 'E' is not assignable to type 'Date'.
|
||||
Property 'toDateString' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(33,9): error TS2322: Type 'E' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(36,9): error TS2322: Type 'E' is not assignable to type '() => {}'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(37,9): error TS2322: Type 'E' is not assignable to type 'Function'.
|
||||
Property 'apply' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(38,9): error TS2322: Type 'E' is not assignable to type '(x: number) => string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(39,5): error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
Property 'foo' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(40,5): error TS2322: Type 'E' is not assignable to type 'I'.
|
||||
Property 'foo' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(41,9): error TS2322: Type 'E' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(42,9): error TS2322: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(43,9): error TS2322: Type 'E' is not assignable to type '<T>(x: T) => T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(45,9): error TS2322: Type 'E' is not assignable to type 'String'.
|
||||
Property 'charAt' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(48,9): error TS2322: Type 'E' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(49,9): error TS2322: Type 'E' is not assignable to type 'U'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts(50,9): error TS2322: Type 'E' is not assignable to type 'V'.
|
||||
@@ -69,7 +62,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi
|
||||
var ee: Date = e;
|
||||
~~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'Date'.
|
||||
!!! error TS2322: Property 'toDateString' is missing in type 'Number'.
|
||||
var f: any = e; // ok
|
||||
var g: void = e;
|
||||
~
|
||||
@@ -82,26 +74,21 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi
|
||||
var k: Function = e;
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'Function'.
|
||||
!!! error TS2322: Property 'apply' is missing in type 'Number'.
|
||||
var l: (x: number) => string = e;
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '(x: number) => string'.
|
||||
ac = e;
|
||||
~~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'Number'.
|
||||
ai = e;
|
||||
~~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'Number'.
|
||||
var m: number[] = e;
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'number[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
var n: { foo: string } = e;
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'Number'.
|
||||
var o: <T>(x: T) => T = e;
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type '<T>(x: T) => T'.
|
||||
@@ -109,7 +96,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssi
|
||||
var q: String = e;
|
||||
~
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'String'.
|
||||
!!! error TS2322: Property 'charAt' is missing in type 'Number'.
|
||||
|
||||
function foo<T, U extends T, V extends Date, A extends Number, B extends E>(x: T, y: U, z: V) {
|
||||
x = e;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
tests/cases/compiler/enumAssignmentCompat.ts(26,5): error TS2322: Type 'typeof W' is not assignable to type 'number'.
|
||||
tests/cases/compiler/enumAssignmentCompat.ts(28,5): error TS2322: Type 'W' is not assignable to type 'typeof W'.
|
||||
Property 'D' is missing in type 'Number'.
|
||||
tests/cases/compiler/enumAssignmentCompat.ts(30,5): error TS2322: Type 'number' is not assignable to type 'typeof W'.
|
||||
tests/cases/compiler/enumAssignmentCompat.ts(32,5): error TS2322: Type 'W' is not assignable to type 'WStatic'.
|
||||
Property 'a' is missing in type 'Number'.
|
||||
tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2322: Type 'number' is not assignable to type 'WStatic'.
|
||||
|
||||
|
||||
@@ -40,7 +38,6 @@ tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2322: Type 'number'
|
||||
var b: typeof W = W.a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'W' is not assignable to type 'typeof W'.
|
||||
!!! error TS2322: Property 'D' is missing in type 'Number'.
|
||||
var c: typeof W.a = W.a;
|
||||
var d: typeof W = 3; // error
|
||||
~
|
||||
@@ -49,7 +46,6 @@ tests/cases/compiler/enumAssignmentCompat.ts(33,5): error TS2322: Type 'number'
|
||||
var f: WStatic = W.a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'W' is not assignable to type 'WStatic'.
|
||||
!!! error TS2322: Property 'a' is missing in type 'Number'.
|
||||
var g: WStatic = 5; // error
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'WStatic'.
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
tests/cases/compiler/enumAssignmentCompat2.ts(25,5): error TS2322: Type 'typeof W' is not assignable to type 'number'.
|
||||
tests/cases/compiler/enumAssignmentCompat2.ts(27,5): error TS2322: Type 'W' is not assignable to type 'typeof W'.
|
||||
Property 'a' is missing in type 'Number'.
|
||||
tests/cases/compiler/enumAssignmentCompat2.ts(29,5): error TS2322: Type 'number' is not assignable to type 'typeof W'.
|
||||
tests/cases/compiler/enumAssignmentCompat2.ts(31,5): error TS2322: Type 'W' is not assignable to type 'WStatic'.
|
||||
Property 'a' is missing in type 'Number'.
|
||||
tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2322: Type 'number' is not assignable to type 'WStatic'.
|
||||
|
||||
|
||||
@@ -39,7 +37,6 @@ tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2322: Type 'number'
|
||||
var b: typeof W = W.a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'W' is not assignable to type 'typeof W'.
|
||||
!!! error TS2322: Property 'a' is missing in type 'Number'.
|
||||
var c: typeof W.a = W.a;
|
||||
var d: typeof W = 3; // error
|
||||
~
|
||||
@@ -48,7 +45,6 @@ tests/cases/compiler/enumAssignmentCompat2.ts(32,5): error TS2322: Type 'number'
|
||||
var f: WStatic = W.a; // error
|
||||
~
|
||||
!!! error TS2322: Type 'W' is not assignable to type 'WStatic'.
|
||||
!!! error TS2322: Property 'a' is missing in type 'Number'.
|
||||
var g: WStatic = 5; // error
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'WStatic'.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(34,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(35,5): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(36,5): error TS2322: Type 'number' is not assignable to type 'Date'.
|
||||
Property 'toDateString' is missing in type 'Number'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(38,5): error TS2322: Type 'number' is not assignable to type 'void'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(40,5): error TS2322: Type 'D<{}>' is not assignable to type 'I'.
|
||||
Property 'id' is missing in type 'D<{}>'.
|
||||
@@ -76,7 +75,6 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd
|
||||
var aDate: Date = 9.9;
|
||||
~~~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Date'.
|
||||
!!! error TS2322: Property 'toDateString' is missing in type 'Number'.
|
||||
|
||||
var aVoid: void = 9.9;
|
||||
~~~~~
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/conformance/externalModules/foo_1.ts(2,17): error TS2345: Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'.
|
||||
Property 'a' is missing in type 'Boolean'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ====
|
||||
@@ -7,7 +6,6 @@ tests/cases/conformance/externalModules/foo_1.ts(2,17): error TS2345: Argument o
|
||||
var x = new foo(true); // Should error
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'.
|
||||
!!! error TS2345: Property 'a' is missing in type 'Boolean'.
|
||||
var y = new foo({a: "test", b: 42}); // Should be OK
|
||||
var z: number = y.test.b;
|
||||
==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ====
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/compiler/functionCall7.ts(5,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/compiler/functionCall7.ts(6,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'c1'.
|
||||
Property 'a' is missing in type 'Number'.
|
||||
tests/cases/compiler/functionCall7.ts(7,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
|
||||
|
||||
@@ -15,7 +14,6 @@ tests/cases/compiler/functionCall7.ts(7,1): error TS2346: Supplied parameters do
|
||||
foo(4);
|
||||
~
|
||||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'c1'.
|
||||
!!! error TS2345: Property 'a' is missing in type 'Number'.
|
||||
foo();
|
||||
~~~~~
|
||||
!!! error TS2346: Supplied parameters do not match any signature of call target.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(5,5): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Function'.
|
||||
Property 'apply' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(6,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(7,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(23,14): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(x: string) => string'.
|
||||
@@ -20,9 +19,11 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain
|
||||
Type 'F2' provides no match for the signature '(x: string): string'
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(37,10): error TS2345: Argument of type 'T' is not assignable to parameter of type '(x: string) => string'.
|
||||
Type '() => void' is not assignable to type '(x: string) => string'.
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(38,10): error TS2345: Argument of type 'U' is not assignable to parameter of type '(x: string) => string'.
|
||||
Type 'T' is not assignable to type '(x: string) => string'.
|
||||
Type '() => void' is not assignable to type '(x: string) => string'.
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts (13 errors) ====
|
||||
@@ -33,7 +34,6 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain
|
||||
foo(1);
|
||||
~
|
||||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Function'.
|
||||
!!! error TS2345: Property 'apply' is missing in type 'Number'.
|
||||
foo(() => { }, 1);
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2346: Supplied parameters do not match any signature of call target.
|
||||
@@ -97,10 +97,12 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain
|
||||
~
|
||||
!!! error TS2345: Argument of type 'T' is not assignable to parameter of type '(x: string) => string'.
|
||||
!!! error TS2345: Type '() => void' is not assignable to type '(x: string) => string'.
|
||||
!!! error TS2345: Type 'void' is not assignable to type 'string'.
|
||||
foo2(y);
|
||||
~
|
||||
!!! error TS2345: Argument of type 'U' is not assignable to parameter of type '(x: string) => string'.
|
||||
!!! error TS2345: Type 'T' is not assignable to type '(x: string) => string'.
|
||||
!!! error TS2345: Type '() => void' is not assignable to type '(x: string) => string'.
|
||||
!!! error TS2345: Type 'void' is not assignable to type 'string'.
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts(11,26): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Date'.
|
||||
Property 'toDateString' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstraintsTypeArgumentInference2.ts (1 errors) ====
|
||||
@@ -16,5 +15,4 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithCon
|
||||
var r4 = foo<Date, Date>(1); // error
|
||||
~
|
||||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Date'.
|
||||
!!! error TS2345: Property 'toDateString' is missing in type 'Number'.
|
||||
var r5 = foo<Date, Date>(new Date()); // no error
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/compiler/genericCombinators2.ts(15,43): error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'.
|
||||
Type 'string' is not assignable to type 'Date'.
|
||||
Property 'toDateString' is missing in type 'String'.
|
||||
tests/cases/compiler/genericCombinators2.ts(16,43): error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'.
|
||||
Type 'string' is not assignable to type 'Date'.
|
||||
|
||||
@@ -24,7 +23,6 @@ tests/cases/compiler/genericCombinators2.ts(16,43): error TS2345: Argument of ty
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Property 'toDateString' is missing in type 'String'.
|
||||
var r5b = _.map<number, string, Date>(c2, rf1);
|
||||
~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts(11,1): error TS2322: Type 'B<number>' is not assignable to type 'A<{ length: number; foo: number; }>'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type '{ length: number; foo: number; }'.
|
||||
Property 'foo' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts (1 errors) ====
|
||||
@@ -20,5 +19,4 @@ tests/cases/compiler/genericDerivedTypeWithSpecializedBase2.ts(11,1): error TS23
|
||||
!!! error TS2322: Type 'B<number>' is not assignable to type 'A<{ length: number; foo: number; }>'.
|
||||
!!! error TS2322: Types of property 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type '{ length: number; foo: number; }'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'String'.
|
||||
|
||||
@@ -4,7 +4,6 @@ tests/cases/compiler/genericRestArgs.ts(5,34): error TS2345: Argument of type 's
|
||||
tests/cases/compiler/genericRestArgs.ts(10,12): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'.
|
||||
tests/cases/compiler/genericRestArgs.ts(12,30): error TS2345: Argument of type 'number' is not assignable to parameter of type 'any[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericRestArgs.ts (4 errors) ====
|
||||
@@ -29,5 +28,4 @@ tests/cases/compiler/genericRestArgs.ts(12,30): error TS2345: Argument of type '
|
||||
var a2Gb = makeArrayG<any>(1, "");
|
||||
var a2Gc = makeArrayG<any[]>(1, ""); // error
|
||||
~
|
||||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'any[]'.
|
||||
!!! error TS2345: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'any[]'.
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/instanceSubtypeCheck2.ts(5,7): error TS2415: Class 'C2<T>' incorrectly extends base class 'C1<T>'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'C2<T>'.
|
||||
Property 'x' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/instanceSubtypeCheck2.ts (1 errors) ====
|
||||
@@ -14,6 +13,5 @@ tests/cases/compiler/instanceSubtypeCheck2.ts(5,7): error TS2415: Class 'C2<T>'
|
||||
!!! error TS2415: Class 'C2<T>' incorrectly extends base class 'C1<T>'.
|
||||
!!! error TS2415: Types of property 'x' are incompatible.
|
||||
!!! error TS2415: Type 'string' is not assignable to type 'C2<T>'.
|
||||
!!! error TS2415: Property 'x' is missing in type 'String'.
|
||||
x: string
|
||||
}
|
||||
@@ -9,7 +9,6 @@ tests/cases/compiler/intTypeCheck.ts(101,5): error TS2322: Type 'Base' is not as
|
||||
tests/cases/compiler/intTypeCheck.ts(103,5): error TS2322: Type '() => void' is not assignable to type 'i1'.
|
||||
Property 'p' is missing in type '() => void'.
|
||||
tests/cases/compiler/intTypeCheck.ts(106,5): error TS2322: Type 'boolean' is not assignable to type 'i1'.
|
||||
Property 'p' is missing in type 'Boolean'.
|
||||
tests/cases/compiler/intTypeCheck.ts(106,20): error TS1109: Expression expected.
|
||||
tests/cases/compiler/intTypeCheck.ts(106,21): error TS2304: Cannot find name 'i1'.
|
||||
tests/cases/compiler/intTypeCheck.ts(107,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
@@ -38,7 +37,6 @@ tests/cases/compiler/intTypeCheck.ts(134,22): error TS2304: Cannot find name 'i3
|
||||
tests/cases/compiler/intTypeCheck.ts(135,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
tests/cases/compiler/intTypeCheck.ts(142,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
tests/cases/compiler/intTypeCheck.ts(148,5): error TS2322: Type 'boolean' is not assignable to type 'i4'.
|
||||
Index signature is missing in type 'Boolean'.
|
||||
tests/cases/compiler/intTypeCheck.ts(148,21): error TS1109: Expression expected.
|
||||
tests/cases/compiler/intTypeCheck.ts(148,22): error TS2304: Cannot find name 'i4'.
|
||||
tests/cases/compiler/intTypeCheck.ts(149,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
@@ -52,7 +50,6 @@ tests/cases/compiler/intTypeCheck.ts(157,5): error TS2322: Type 'Base' is not as
|
||||
tests/cases/compiler/intTypeCheck.ts(159,5): error TS2322: Type '() => void' is not assignable to type 'i5'.
|
||||
Property 'p' is missing in type '() => void'.
|
||||
tests/cases/compiler/intTypeCheck.ts(162,5): error TS2322: Type 'boolean' is not assignable to type 'i5'.
|
||||
Property 'p' is missing in type 'Boolean'.
|
||||
tests/cases/compiler/intTypeCheck.ts(162,21): error TS1109: Expression expected.
|
||||
tests/cases/compiler/intTypeCheck.ts(162,22): error TS2304: Cannot find name 'i5'.
|
||||
tests/cases/compiler/intTypeCheck.ts(163,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
@@ -83,7 +80,6 @@ tests/cases/compiler/intTypeCheck.ts(190,22): error TS2304: Cannot find name 'i7
|
||||
tests/cases/compiler/intTypeCheck.ts(191,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
tests/cases/compiler/intTypeCheck.ts(198,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
tests/cases/compiler/intTypeCheck.ts(204,5): error TS2322: Type 'boolean' is not assignable to type 'i8'.
|
||||
Index signature is missing in type 'Boolean'.
|
||||
tests/cases/compiler/intTypeCheck.ts(204,21): error TS1109: Expression expected.
|
||||
tests/cases/compiler/intTypeCheck.ts(204,22): error TS2304: Cannot find name 'i8'.
|
||||
tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
@@ -215,7 +211,6 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit
|
||||
var obj9: i1 = new <i1> anyVar;
|
||||
~~~~
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'i1'.
|
||||
!!! error TS2322: Property 'p' is missing in type 'Boolean'.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~
|
||||
@@ -307,7 +302,6 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit
|
||||
var obj42: i4 = new <i4> anyVar;
|
||||
~~~~~
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'i4'.
|
||||
!!! error TS2322: Index signature is missing in type 'Boolean'.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~
|
||||
@@ -344,7 +338,6 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit
|
||||
var obj53: i5 = new <i5> anyVar;
|
||||
~~~~~
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'i5'.
|
||||
!!! error TS2322: Property 'p' is missing in type 'Boolean'.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~
|
||||
@@ -439,7 +432,6 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit
|
||||
var obj86: i8 = new <i8> anyVar;
|
||||
~~~~~
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'i8'.
|
||||
!!! error TS2322: Index signature is missing in type 'Boolean'.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~
|
||||
|
||||
@@ -4,7 +4,6 @@ tests/cases/compiler/interfaceImplementation7.ts(7,7): error TS2420: Class 'C1'
|
||||
Types of property 'name' are incompatible.
|
||||
Type '() => string' is not assignable to type '() => { s: string; n: number; }'.
|
||||
Type 'string' is not assignable to type '{ s: string; n: number; }'.
|
||||
Property 's' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/interfaceImplementation7.ts (2 errors) ====
|
||||
@@ -23,7 +22,6 @@ tests/cases/compiler/interfaceImplementation7.ts(7,7): error TS2420: Class 'C1'
|
||||
!!! error TS2420: Types of property 'name' are incompatible.
|
||||
!!! error TS2420: Type '() => string' is not assignable to type '() => { s: string; n: number; }'.
|
||||
!!! error TS2420: Type 'string' is not assignable to type '{ s: string; n: number; }'.
|
||||
!!! error TS2420: Property 's' is missing in type 'String'.
|
||||
public name(): string { return ""; }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(19,1): error TS2322: Type 'A' is not assignable to type 'A & B'.
|
||||
Type 'A' is not assignable to type 'B'.
|
||||
Property 'b' is missing in type 'A'.
|
||||
tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(20,1): error TS2322: Type 'B' is not assignable to type 'A & B'.
|
||||
Type 'B' is not assignable to type 'A'.
|
||||
Property 'a' is missing in type 'B'.
|
||||
@@ -7,26 +8,32 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(23,1): e
|
||||
Type 'A' is not assignable to type '(A & B) | (C & D)'.
|
||||
Type 'A' is not assignable to type 'C & D'.
|
||||
Type 'A' is not assignable to type 'C'.
|
||||
Property 'c' is missing in type 'A'.
|
||||
tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(25,1): error TS2322: Type 'C | D' is not assignable to type '(A & B) | (C & D)'.
|
||||
Type 'C' is not assignable to type '(A & B) | (C & D)'.
|
||||
Type 'C' is not assignable to type 'C & D'.
|
||||
Type 'C' is not assignable to type 'D'.
|
||||
Property 'd' is missing in type 'C'.
|
||||
tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(26,1): error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A & B'.
|
||||
Type 'C & D' is not assignable to type 'A & B'.
|
||||
Type 'C & D' is not assignable to type 'A'.
|
||||
Type 'D' is not assignable to type 'A'.
|
||||
Property 'a' is missing in type 'D'.
|
||||
tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(27,1): error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A | B'.
|
||||
Type 'C & D' is not assignable to type 'A | B'.
|
||||
Type 'C & D' is not assignable to type 'B'.
|
||||
Type 'D' is not assignable to type 'B'.
|
||||
Property 'b' is missing in type 'D'.
|
||||
tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(28,1): error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C & D'.
|
||||
Type 'A & B' is not assignable to type 'C & D'.
|
||||
Type 'A & B' is not assignable to type 'C'.
|
||||
Type 'B' is not assignable to type 'C'.
|
||||
Property 'c' is missing in type 'B'.
|
||||
tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(29,1): error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C | D'.
|
||||
Type 'A & B' is not assignable to type 'C | D'.
|
||||
Type 'A & B' is not assignable to type 'D'.
|
||||
Type 'B' is not assignable to type 'D'.
|
||||
Property 'd' is missing in type 'B'.
|
||||
tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(31,1): error TS2322: Type 'A & B' is not assignable to type '(A | B) & (C | D)'.
|
||||
Type 'A & B' is not assignable to type 'C | D'.
|
||||
Type 'A & B' is not assignable to type 'D'.
|
||||
@@ -35,6 +42,7 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(32,1): e
|
||||
Type 'A' is not assignable to type '(A | B) & (C | D)'.
|
||||
Type 'A' is not assignable to type 'C | D'.
|
||||
Type 'A' is not assignable to type 'D'.
|
||||
Property 'd' is missing in type 'A'.
|
||||
tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(33,1): error TS2322: Type 'C & D' is not assignable to type '(A | B) & (C | D)'.
|
||||
Type 'C & D' is not assignable to type 'A | B'.
|
||||
Type 'C & D' is not assignable to type 'B'.
|
||||
@@ -43,14 +51,17 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(34,1): e
|
||||
Type 'C' is not assignable to type '(A | B) & (C | D)'.
|
||||
Type 'C' is not assignable to type 'A | B'.
|
||||
Type 'C' is not assignable to type 'B'.
|
||||
Property 'b' is missing in type 'C'.
|
||||
tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(35,1): error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'A & B'.
|
||||
Type '(A | B) & (C | D)' is not assignable to type 'A'.
|
||||
Type 'C | D' is not assignable to type 'A'.
|
||||
Type 'C' is not assignable to type 'A'.
|
||||
Property 'a' is missing in type 'C'.
|
||||
tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'C & D'.
|
||||
Type '(A | B) & (C | D)' is not assignable to type 'C'.
|
||||
Type 'C | D' is not assignable to type 'C'.
|
||||
Type 'D' is not assignable to type 'C'.
|
||||
Property 'c' is missing in type 'D'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts (14 errors) ====
|
||||
@@ -76,6 +87,7 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e
|
||||
~~~
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'A & B'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B'.
|
||||
!!! error TS2322: Property 'b' is missing in type 'A'.
|
||||
anb = b;
|
||||
~~~
|
||||
!!! error TS2322: Type 'B' is not assignable to type 'A & B'.
|
||||
@@ -89,6 +101,7 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e
|
||||
!!! error TS2322: Type 'A' is not assignable to type '(A & B) | (C & D)'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'C & D'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'c' is missing in type 'A'.
|
||||
x = cnd; // Ok
|
||||
x = cod;
|
||||
~
|
||||
@@ -96,30 +109,35 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e
|
||||
!!! error TS2322: Type 'C' is not assignable to type '(A & B) | (C & D)'.
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'C & D'.
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'd' is missing in type 'C'.
|
||||
anb = x;
|
||||
~~~
|
||||
!!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A & B'.
|
||||
!!! error TS2322: Type 'C & D' is not assignable to type 'A & B'.
|
||||
!!! error TS2322: Type 'C & D' is not assignable to type 'A'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'A'.
|
||||
!!! error TS2322: Property 'a' is missing in type 'D'.
|
||||
aob = x;
|
||||
~~~
|
||||
!!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A | B'.
|
||||
!!! error TS2322: Type 'C & D' is not assignable to type 'A | B'.
|
||||
!!! error TS2322: Type 'C & D' is not assignable to type 'B'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'B'.
|
||||
!!! error TS2322: Property 'b' is missing in type 'D'.
|
||||
cnd = x;
|
||||
~~~
|
||||
!!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C & D'.
|
||||
!!! error TS2322: Type 'A & B' is not assignable to type 'C & D'.
|
||||
!!! error TS2322: Type 'A & B' is not assignable to type 'C'.
|
||||
!!! error TS2322: Type 'B' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'c' is missing in type 'B'.
|
||||
cod = x;
|
||||
~~~
|
||||
!!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C | D'.
|
||||
!!! error TS2322: Type 'A & B' is not assignable to type 'C | D'.
|
||||
!!! error TS2322: Type 'A & B' is not assignable to type 'D'.
|
||||
!!! error TS2322: Type 'B' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'd' is missing in type 'B'.
|
||||
|
||||
y = anb;
|
||||
~
|
||||
@@ -133,6 +151,7 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e
|
||||
!!! error TS2322: Type 'A' is not assignable to type '(A | B) & (C | D)'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'C | D'.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'd' is missing in type 'A'.
|
||||
y = cnd;
|
||||
~
|
||||
!!! error TS2322: Type 'C & D' is not assignable to type '(A | B) & (C | D)'.
|
||||
@@ -145,12 +164,14 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e
|
||||
!!! error TS2322: Type 'C' is not assignable to type '(A | B) & (C | D)'.
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'A | B'.
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'B'.
|
||||
!!! error TS2322: Property 'b' is missing in type 'C'.
|
||||
anb = y;
|
||||
~~~
|
||||
!!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'A & B'.
|
||||
!!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'A'.
|
||||
!!! error TS2322: Type 'C | D' is not assignable to type 'A'.
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'A'.
|
||||
!!! error TS2322: Property 'a' is missing in type 'C'.
|
||||
aob = y; // Ok
|
||||
cnd = y;
|
||||
~~~
|
||||
@@ -158,5 +179,6 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e
|
||||
!!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'C'.
|
||||
!!! error TS2322: Type 'C | D' is not assignable to type 'C'.
|
||||
!!! error TS2322: Type 'D' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'c' is missing in type 'D'.
|
||||
cod = y; // Ok
|
||||
|
||||
@@ -3,9 +3,7 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(4,
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(5,5): error TS2322: Type 'boolean' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(9,5): error TS2322: Type 'boolean' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'C'.
|
||||
Property 'foo' is missing in type 'Boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(15,5): error TS2322: Type 'boolean' is not assignable to type 'I'.
|
||||
Property 'bar' is missing in type 'Boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(17,5): error TS2322: Type 'boolean' is not assignable to type '() => string'.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(21,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(24,5): error TS2322: Type 'boolean' is not assignable to type 'T'.
|
||||
@@ -35,13 +33,11 @@ tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts(26
|
||||
var f: C = x;
|
||||
~
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'Boolean'.
|
||||
|
||||
interface I { bar: string }
|
||||
var g: I = x;
|
||||
~
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Boolean'.
|
||||
|
||||
var h: { (): string } = x;
|
||||
~
|
||||
|
||||
@@ -2,13 +2,9 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(3,5)
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(4,5): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(5,5): error TS2322: Type 'number' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(9,5): error TS2322: Type 'number' is not assignable to type 'C'.
|
||||
Property 'foo' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(12,5): error TS2322: Type 'number' is not assignable to type 'I'.
|
||||
Property 'bar' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'.
|
||||
Property 'baz' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'.
|
||||
Property '0' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(21,5): error TS2322: Type 'number' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
@@ -32,22 +28,18 @@ tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts(23,1
|
||||
var e: C = x;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'Number'.
|
||||
|
||||
interface I { bar: string; }
|
||||
var f: I = x;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'bar' is missing in type 'Number'.
|
||||
|
||||
var g: { baz: string } = 1;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }'.
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Number'.
|
||||
var g2: { 0: number } = 1;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }'.
|
||||
!!! error TS2322: Property '0' is missing in type 'Number'.
|
||||
|
||||
module M { export var x = 1; }
|
||||
M = x;
|
||||
|
||||
@@ -2,13 +2,9 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(3,5)
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(4,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(5,5): error TS2322: Type 'string' is not assignable to type 'void'.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(9,5): error TS2322: Type 'string' is not assignable to type 'C'.
|
||||
Property 'foo' is missing in type 'String'.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(12,5): error TS2322: Type 'string' is not assignable to type 'I'.
|
||||
Property 'bar' is missing in type 'String'.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'.
|
||||
Property 'baz' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'.
|
||||
Property '0' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(21,5): error TS2322: Type 'string' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
@@ -33,22 +29,18 @@ tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts(26,5
|
||||
var e: C = x;
|
||||
~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'C'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'String'.
|
||||
|
||||
interface I { bar: string; }
|
||||
var f: I = x;
|
||||
~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'bar' is missing in type 'String'.
|
||||
|
||||
var g: { baz: string } = 1;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }'.
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Number'.
|
||||
var g2: { 0: number } = 1;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }'.
|
||||
!!! error TS2322: Property '0' is missing in type 'Number'.
|
||||
|
||||
module M { export var x = 1; }
|
||||
M = x;
|
||||
|
||||
@@ -4,9 +4,7 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(5,5): er
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(9,5): error TS2322: Type 'void' is not assignable to type 'C'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(12,5): error TS2322: Type 'void' is not assignable to type 'I'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ baz: string; }'.
|
||||
Property 'baz' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(15,5): error TS2322: Type 'number' is not assignable to type '{ 0: number; }'.
|
||||
Property '0' is missing in type 'Number'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(18,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(21,5): error TS2322: Type 'void' is not assignable to type 'T'.
|
||||
tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(23,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
@@ -42,11 +40,9 @@ tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts(29,1): e
|
||||
var g: { baz: string } = 1;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }'.
|
||||
!!! error TS2322: Property 'baz' is missing in type 'Number'.
|
||||
var g2: { 0: number } = 1;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }'.
|
||||
!!! error TS2322: Property '0' is missing in type 'Number'.
|
||||
|
||||
module M { export var x = 1; }
|
||||
M = x;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
tests/cases/compiler/lastPropertyInLiteralWins.ts(7,6): error TS2345: Argument of type '{ thunk: (num: number) => void; }' is not assignable to parameter of type 'Thing'.
|
||||
Types of property 'thunk' are incompatible.
|
||||
Type '(num: number) => void' is not assignable to type '(str: string) => void'.
|
||||
Types of parameters 'num' and 'str' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/lastPropertyInLiteralWins.ts(8,5): error TS2300: Duplicate identifier 'thunk'.
|
||||
tests/cases/compiler/lastPropertyInLiteralWins.ts(9,5): error TS2300: Duplicate identifier 'thunk'.
|
||||
tests/cases/compiler/lastPropertyInLiteralWins.ts(13,5): error TS2300: Duplicate identifier 'thunk'.
|
||||
@@ -29,6 +31,8 @@ tests/cases/compiler/lastPropertyInLiteralWins.ts(14,5): error TS2300: Duplicate
|
||||
!!! error TS2345: Argument of type '{ thunk: (num: number) => void; }' is not assignable to parameter of type 'Thing'.
|
||||
!!! error TS2345: Types of property 'thunk' are incompatible.
|
||||
!!! error TS2345: Type '(num: number) => void' is not assignable to type '(str: string) => void'.
|
||||
!!! error TS2345: Types of parameters 'num' and 'str' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
test({ // Should be OK. Last 'thunk' is of correct type
|
||||
thunk: (num: number) => {},
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/compiler/maxConstraints.ts(8,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable<number>'.
|
||||
Property 'compareTo' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/maxConstraints.ts (1 errors) ====
|
||||
@@ -12,5 +11,4 @@ tests/cases/compiler/maxConstraints.ts(8,22): error TS2345: Argument of type 'nu
|
||||
var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y };
|
||||
var maxResult = max2(1, 2);
|
||||
~
|
||||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable<number>'.
|
||||
!!! error TS2345: Property 'compareTo' is missing in type 'Number'.
|
||||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable<number>'.
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/compiler/numericIndexerConstraint1.ts(3,5): error TS2322: Type 'number' is not assignable to type 'Foo'.
|
||||
Property 'foo' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/numericIndexerConstraint1.ts (1 errors) ====
|
||||
@@ -8,5 +7,4 @@ tests/cases/compiler/numericIndexerConstraint1.ts(3,5): error TS2322: Type 'numb
|
||||
var result: Foo = x["one"]; // error
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'Foo'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'Number'.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [s: string]: A; [n: number]: B; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'A' is not assignable to type 'B'.
|
||||
Property 'y' is missing in type 'A'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/objectLiteralIndexerErrors.ts (1 errors) ====
|
||||
@@ -21,4 +22,5 @@ tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{
|
||||
!!! error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [s: string]: A; [n: number]: B; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B'.
|
||||
!!! error TS2322: Property 'y' is missing in type 'A'.
|
||||
o1 = { x: c, 0: a }; // string indexer is any, number indexer is A
|
||||
@@ -2,7 +2,6 @@ tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeBy
|
||||
tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts(5,17): error TS1210: Invalid use of 'eval'. Class definitions are automatically in strict mode.
|
||||
tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts(6,9): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
||||
tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts(6,9): error TS2322: Type 'string' is not assignable to type 'IArguments'.
|
||||
Property 'callee' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeByDefaultInES6.ts (4 errors) ====
|
||||
@@ -20,6 +19,5 @@ tests/cases/conformance/es6/classDeclaration/parseClassDeclarationInStrictModeBy
|
||||
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'IArguments'.
|
||||
!!! error TS2322: Property 'callee' is missing in type 'String'.
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/compiler/promiseChaining1.ts(7,50): error TS2345: Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'.
|
||||
Type 'string' is not assignable to type 'Function'.
|
||||
Property 'apply' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/promiseChaining1.ts (1 errors) ====
|
||||
@@ -14,7 +13,6 @@ tests/cases/compiler/promiseChaining1.ts(7,50): error TS2345: Argument of type '
|
||||
~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Function'.
|
||||
!!! error TS2345: Property 'apply' is missing in type 'String'.
|
||||
return new Chain2(result);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/compiler/promiseChaining2.ts(7,45): error TS2345: Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'.
|
||||
Type 'string' is not assignable to type 'Function'.
|
||||
Property 'apply' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/promiseChaining2.ts (1 errors) ====
|
||||
@@ -14,7 +13,6 @@ tests/cases/compiler/promiseChaining2.ts(7,45): error TS2345: Argument of type '
|
||||
~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Function'.
|
||||
!!! error TS2345: Property 'apply' is missing in type 'String'.
|
||||
return new Chain2(result);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/promisePermutations.ts(74,70): error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'IPromise<number>'.
|
||||
Property 'then' is missing in type 'Number'.
|
||||
tests/cases/compiler/promisePermutations.ts(79,19): error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
@@ -157,7 +156,6 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
|
||||
!!! error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'IPromise<number>'.
|
||||
!!! error TS2345: Property 'then' is missing in type 'Number'.
|
||||
|
||||
var r4: IPromise<string>;
|
||||
var sIPromise: (x: any) => IPromise<string>;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/promisePermutations2.ts(73,70): error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'IPromise<number>'.
|
||||
Property 'then' is missing in type 'Number'.
|
||||
tests/cases/compiler/promisePermutations2.ts(78,19): error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
@@ -156,7 +155,6 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
|
||||
!!! error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'IPromise<number>'.
|
||||
!!! error TS2345: Property 'then' is missing in type 'Number'.
|
||||
|
||||
var r4: IPromise<string>;
|
||||
var sIPromise: (x: any) => IPromise<string>;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/promisePermutations3.ts(68,69): error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'IPromise<number>'.
|
||||
Property 'then' is missing in type 'Number'.
|
||||
tests/cases/compiler/promisePermutations3.ts(73,70): error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'IPromise<number>'.
|
||||
@@ -159,7 +158,6 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
||||
!!! error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'IPromise<number>'.
|
||||
!!! error TS2345: Property 'then' is missing in type 'Number'.
|
||||
var s3: Promise<number>;
|
||||
var s3a = s3.then(testFunction3, testFunction3, testFunction3);
|
||||
var s3b = s3.then(testFunction3P, testFunction3P, testFunction3P);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
tests/cases/compiler/qualify.ts(21,13): error TS2322: Type 'number' is not assignable to type 'I'.
|
||||
Property 'p' is missing in type 'Number'.
|
||||
tests/cases/compiler/qualify.ts(30,13): error TS2322: Type 'number' is not assignable to type 'I2'.
|
||||
Property 'q' is missing in type 'Number'.
|
||||
tests/cases/compiler/qualify.ts(45,13): error TS2322: Type 'I4' is not assignable to type 'I3'.
|
||||
Property 'zeep' is missing in type 'I4'.
|
||||
tests/cases/compiler/qualify.ts(46,13): error TS2322: Type 'I4' is not assignable to type 'I3[]'.
|
||||
@@ -40,7 +38,6 @@ tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable
|
||||
var z:I=3;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'p' is missing in type 'Number'.
|
||||
export interface I2 {
|
||||
q;
|
||||
}
|
||||
@@ -52,7 +49,6 @@ tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable
|
||||
var z:T.U.I2=3;
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'I2'.
|
||||
!!! error TS2322: Property 'q' is missing in type 'Number'.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/restArgAssignmentCompat.ts(7,1): error TS2322: Type '(...x: number[]) => void' is not assignable to type '(x: number[], y: string) => void'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'number' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/restArgAssignmentCompat.ts (1 errors) ====
|
||||
@@ -16,6 +15,5 @@ tests/cases/compiler/restArgAssignmentCompat.ts(7,1): error TS2322: Type '(...x:
|
||||
!!! error TS2322: Type '(...x: number[]) => void' is not assignable to type '(x: number[], y: string) => void'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'number[]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
n([4], 'foo');
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
tests/cases/compiler/returnInConstructor1.ts(11,16): error TS2322: Type 'number' is not assignable to type 'B'.
|
||||
Property 'foo' is missing in type 'Number'.
|
||||
tests/cases/compiler/returnInConstructor1.ts(11,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
tests/cases/compiler/returnInConstructor1.ts(25,16): error TS2322: Type 'string' is not assignable to type 'D'.
|
||||
Property 'foo' is missing in type 'String'.
|
||||
tests/cases/compiler/returnInConstructor1.ts(25,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
tests/cases/compiler/returnInConstructor1.ts(39,16): error TS2322: Type '{ foo: number; }' is not assignable to type 'F'.
|
||||
Types of property 'foo' are incompatible.
|
||||
@@ -28,7 +26,6 @@ tests/cases/compiler/returnInConstructor1.ts(55,16): error TS2409: Return type o
|
||||
return 1; // error
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'B'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'Number'.
|
||||
~
|
||||
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
}
|
||||
@@ -47,7 +44,6 @@ tests/cases/compiler/returnInConstructor1.ts(55,16): error TS2409: Return type o
|
||||
return "test"; // error
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'String'.
|
||||
~~~~~~
|
||||
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(11,7): error TS2415: Class 'B' incorrectly extends base class 'A'.
|
||||
Index signatures are incompatible.
|
||||
Type 'string' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'String'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(20,11): error TS2415: Class 'B' incorrectly extends base class 'A<Base>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'string' is not assignable to type 'Base'.
|
||||
Property 'foo' is missing in type 'String'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(20,23): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(24,11): error TS2415: Class 'B3<T>' incorrectly extends base class 'A<T>'.
|
||||
@@ -29,7 +27,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
!!! error TS2415: Class 'B' incorrectly extends base class 'A'.
|
||||
!!! error TS2415: Index signatures are incompatible.
|
||||
!!! error TS2415: Type 'string' is not assignable to type 'Derived'.
|
||||
!!! error TS2415: Property 'bar' is missing in type 'String'.
|
||||
[x: number]: string; // error
|
||||
}
|
||||
|
||||
@@ -43,7 +40,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
!!! error TS2415: Class 'B' incorrectly extends base class 'A<Base>'.
|
||||
!!! error TS2415: Index signatures are incompatible.
|
||||
!!! error TS2415: Type 'string' is not assignable to type 'Base'.
|
||||
!!! error TS2415: Property 'foo' is missing in type 'String'.
|
||||
~~~~
|
||||
!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
!!! error TS2344: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(12,7): error TS2415: Class 'B' incorrectly extends base class 'A'.
|
||||
Types of property 'bar' are incompatible.
|
||||
Type 'string' is not assignable to type 'Base'.
|
||||
Property 'foo' is missing in type 'String'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts(22,7): error TS2415: Class 'B2' incorrectly extends base class 'A2'.
|
||||
Types of property '2.0' are incompatible.
|
||||
Type 'string' is not assignable to type 'Base'.
|
||||
@@ -36,7 +35,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
!!! error TS2415: Class 'B' incorrectly extends base class 'A'.
|
||||
!!! error TS2415: Types of property 'bar' are incompatible.
|
||||
!!! error TS2415: Type 'string' is not assignable to type 'Base'.
|
||||
!!! error TS2415: Property 'foo' is missing in type 'String'.
|
||||
foo: Derived; // ok
|
||||
bar: string; // error
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(17,15): error TS2430: Interface 'B' incorrectly extends interface 'A'.
|
||||
Types of property 'bar' are incompatible.
|
||||
Type 'string' is not assignable to type 'Base'.
|
||||
Property 'foo' is missing in type 'String'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts(27,15): error TS2430: Interface 'B2' incorrectly extends interface 'A2'.
|
||||
Types of property '2.0' are incompatible.
|
||||
Type 'string' is not assignable to type 'Base'.
|
||||
@@ -41,7 +40,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
!!! error TS2430: Interface 'B' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'bar' are incompatible.
|
||||
!!! error TS2430: Type 'string' is not assignable to type 'Base'.
|
||||
!!! error TS2430: Property 'foo' is missing in type 'String'.
|
||||
foo: Derived; // ok
|
||||
bar: string; // error
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(11,7): error TS2415: Class 'B' incorrectly extends base class 'A'.
|
||||
Index signatures are incompatible.
|
||||
Type 'string' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'String'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(20,11): error TS2415: Class 'B' incorrectly extends base class 'A<Base>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'string' is not assignable to type 'Base'.
|
||||
Property 'foo' is missing in type 'String'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(20,23): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(24,11): error TS2415: Class 'B3<T>' incorrectly extends base class 'A<T>'.
|
||||
@@ -29,7 +27,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
!!! error TS2415: Class 'B' incorrectly extends base class 'A'.
|
||||
!!! error TS2415: Index signatures are incompatible.
|
||||
!!! error TS2415: Type 'string' is not assignable to type 'Derived'.
|
||||
!!! error TS2415: Property 'bar' is missing in type 'String'.
|
||||
[x: string]: string; // error
|
||||
}
|
||||
|
||||
@@ -43,7 +40,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
!!! error TS2415: Class 'B' incorrectly extends base class 'A<Base>'.
|
||||
!!! error TS2415: Index signatures are incompatible.
|
||||
!!! error TS2415: Type 'string' is not assignable to type 'Base'.
|
||||
!!! error TS2415: Property 'foo' is missing in type 'String'.
|
||||
~~~~
|
||||
!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
!!! error TS2344: Property 'bar' is missing in type 'Base'.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/compiler/typeArgumentConstraintResolution1.ts(4,12): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Date'.
|
||||
Property 'toDateString' is missing in type 'String'.
|
||||
tests/cases/compiler/typeArgumentConstraintResolution1.ts(11,12): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Date'.
|
||||
|
||||
|
||||
@@ -10,7 +9,6 @@ tests/cases/compiler/typeArgumentConstraintResolution1.ts(11,12): error TS2345:
|
||||
foo1<Date>(""); // should error
|
||||
~~
|
||||
!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'Date'.
|
||||
!!! error TS2345: Property 'toDateString' is missing in type 'String'.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(96,9):
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(97,16): error TS1228: A type predicate is only allowed in return type position for functions and methods.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(98,20): error TS1228: A type predicate is only allowed in return type position for functions and methods.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(105,16): error TS2322: Type 'boolean' is not assignable to type 'D'.
|
||||
Property 'm1' is missing in type 'Boolean'.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(105,16): error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(107,20): error TS1228: A type predicate is only allowed in return type position for functions and methods.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(110,20): error TS1228: A type predicate is only allowed in return type position for functions and methods.
|
||||
@@ -198,7 +197,6 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39
|
||||
return true;
|
||||
~~~~
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'D'.
|
||||
!!! error TS2322: Property 'm1' is missing in type 'Boolean'.
|
||||
~~~~
|
||||
!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class
|
||||
}
|
||||
|
||||
@@ -1,31 +1,19 @@
|
||||
tests/cases/compiler/typeName1.ts(9,5): error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; f(n: number): string; }'.
|
||||
Property 'f' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(10,5): error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; }'.
|
||||
Property 'f' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(11,5): error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; }'.
|
||||
tests/cases/compiler/typeName1.ts(12,5): error TS2322: Type 'number' is not assignable to type '{ x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'.
|
||||
Property 'x' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(13,5): error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'.
|
||||
Property 'x' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ z: number; f: { (n: number): string; (s: string): number; }; }'.
|
||||
Property 'z' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(15,5): error TS2322: Type 'number' is not assignable to type '(s: string) => boolean'.
|
||||
tests/cases/compiler/typeName1.ts(16,5): error TS2322: Type 'number' is not assignable to type '{ (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }'.
|
||||
Property 'z' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(16,10): error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'.
|
||||
tests/cases/compiler/typeName1.ts(17,5): error TS2322: Type 'number' is not assignable to type 'I'.
|
||||
Property 'k' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(18,5): error TS2322: Type 'number' is not assignable to type 'I[][][][]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(19,5): error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(20,5): error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }; }[][]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(20,50): error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'.
|
||||
tests/cases/compiler/typeName1.ts(21,5): error TS2322: Type 'number' is not assignable to type '{ (): {}; new (): number; new (n: number): number; x: string; w: { y: number; }; }'.
|
||||
Property 'x' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(22,5): error TS2322: Type 'number' is not assignable to type '{ (): string; f(x: number): boolean; p: any; q: any; }'.
|
||||
Property 'f' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(23,5): error TS2322: Type 'typeof C' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -41,61 +29,49 @@ tests/cases/compiler/typeName1.ts(23,5): error TS2322: Type 'typeof C' is not as
|
||||
var x1:{ f(s:string):number;f(n:number):string; }=3;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; f(n: number): string; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type 'Number'.
|
||||
var x2:{ f(s:string):number; } =3;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ f(s: string): number; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type 'Number'.
|
||||
var x3:{ (s:string):number;(n:number):string; }=3;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; }'.
|
||||
var x4:{ x;y;z:number;f(n:number):string;f(s:string):number; }=3;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'.
|
||||
!!! error TS2322: Property 'x' is missing in type 'Number'.
|
||||
var x5:{ (s:string):number;(n:number):string;x;y;z:number;f(n:number):string;f(s:string):number; }=3;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (s: string): number; (n: number): string; x: any; y: any; z: number; f(n: number): string; f(s: string): number; }'.
|
||||
!!! error TS2322: Property 'x' is missing in type 'Number'.
|
||||
var x6:{ z:number;f:{(n:number):string;(s:string):number;}; }=3;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ z: number; f: { (n: number): string; (s: string): number; }; }'.
|
||||
!!! error TS2322: Property 'z' is missing in type 'Number'.
|
||||
var x7:(s:string)=>boolean=3;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '(s: string) => boolean'.
|
||||
var x8:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; }=3;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }'.
|
||||
!!! error TS2322: Property 'z' is missing in type 'Number'.
|
||||
~~~~
|
||||
!!! error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'.
|
||||
var x9:I=3;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'I'.
|
||||
!!! error TS2322: Property 'k' is missing in type 'Number'.
|
||||
var x10:I[][][][]=3;
|
||||
~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'I[][][][]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
var x11:{z:I;x:boolean;}[][]=3;
|
||||
~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
var x12:{z:I;x:boolean;y:(s:string)=>boolean;w:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; };}[][]=3;
|
||||
~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }; }[][]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
~~~~
|
||||
!!! error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'.
|
||||
var x13:{ new(): number; new(n:number):number; x: string; w: {y: number;}; (): {}; } = 3;
|
||||
~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (): {}; new (): number; new (n: number): number; x: string; w: { y: number; }; }'.
|
||||
!!! error TS2322: Property 'x' is missing in type 'Number'.
|
||||
var x14:{ f(x:number):boolean; p; q; ():string; }=3;
|
||||
~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (): string; f(x: number): boolean; p: any; q: any; }'.
|
||||
!!! error TS2322: Property 'f' is missing in type 'Number'.
|
||||
var x15:number=C;
|
||||
~~~
|
||||
!!! error TS2322: Type 'typeof C' is not assignable to type 'number'.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/compiler/typeOfOnTypeArg.ts(7,6): error TS2345: Argument of type 'number' is not assignable to parameter of type '{ '': number; }'.
|
||||
Property '''' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/typeOfOnTypeArg.ts (1 errors) ====
|
||||
@@ -12,5 +11,4 @@ tests/cases/compiler/typeOfOnTypeArg.ts(7,6): error TS2345: Argument of type 'nu
|
||||
fill(32);
|
||||
~~
|
||||
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type '{ '': number; }'.
|
||||
!!! error TS2345: Property '''' is missing in type 'Number'.
|
||||
|
||||
@@ -10,7 +10,6 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTy
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTypeParameterConstraint2.ts(18,10): error TS2345: Argument of type 'string[]' is not assignable to parameter of type '{ length: any[]; }'.
|
||||
Types of property 'length' are incompatible.
|
||||
Type 'number' is not assignable to type 'any[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTypeParameterConstraint2.ts (6 errors) ====
|
||||
@@ -49,5 +48,4 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/typeParameterAsTy
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type '{ length: any[]; }'.
|
||||
!!! error TS2345: Types of property 'length' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'any[]'.
|
||||
!!! error TS2345: Property 'length' is missing in type 'Number'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'any[]'.
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/compiler/wrappedRecursiveGenericType.ts(13,1): error TS2322: Type 'number' is not assignable to type 'X<number>'.
|
||||
Property 'e' is missing in type 'Number'.
|
||||
tests/cases/compiler/wrappedRecursiveGenericType.ts(14,1): error TS2322: Type 'number' is not assignable to type 'X<number>'.
|
||||
|
||||
|
||||
@@ -19,7 +18,6 @@ tests/cases/compiler/wrappedRecursiveGenericType.ts(14,1): error TS2322: Type 'n
|
||||
x.a.b.val = 5; // val -> X<number> (This should be an error)
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'X<number>'.
|
||||
!!! error TS2322: Property 'e' is missing in type 'Number'.
|
||||
x.a.b.a.val = 5; // val -> X<number> (This should be an error)
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'X<number>'.
|
||||
Reference in New Issue
Block a user