mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Only report errors from the first failure
Accept the new baselines based on this change. Gets rid of a lot of redundant errors.
This commit is contained in:
@@ -5453,7 +5453,7 @@ namespace ts {
|
||||
localErrors = false;
|
||||
}
|
||||
}
|
||||
if (reportErrors) {
|
||||
if (localErrors) {
|
||||
reportError(Diagnostics.Signature_0_has_no_corresponding_signature_in_1,
|
||||
signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind),
|
||||
typeToString(source));
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2430: Interface 'Bar' incorrectly extends interface 'Foo'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(key: string) => string' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '(key: string) => string'
|
||||
|
||||
|
||||
==== tests/cases/compiler/addMoreOverloadsToBaseSignature.ts (1 errors) ====
|
||||
@@ -14,7 +13,6 @@ tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2430: Int
|
||||
!!! error TS2430: Interface 'Bar' incorrectly extends interface 'Foo'.
|
||||
!!! error TS2430: Types of property 'f' are incompatible.
|
||||
!!! error TS2430: Type '(key: string) => string' is not assignable to type '() => string'.
|
||||
!!! error TS2430: Signature '(): string' has no corresponding signature in '(key: string) => string'
|
||||
f(key: string): string;
|
||||
}
|
||||
|
||||
@@ -29,15 +29,13 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(24,5): error
|
||||
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(25,5): error TS2322: Type '[string, number]' is not assignable to type '[string]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '() => string | number'
|
||||
Type 'string | number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'string | number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(26,5): error TS2322: Type 'StrNum' is not assignable to type '[string]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '() => string | number'
|
||||
Type 'string | number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'string | number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(27,5): error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[string]'.
|
||||
Property 'length' is missing in type '{ 0: string; 1: number; }'.
|
||||
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(28,5): error TS2322: Type '[string, number]' is not assignable to type '[number, string]'.
|
||||
@@ -122,17 +120,15 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(30,5): error
|
||||
!!! error TS2322: Type '[string, number]' is not assignable to type '[string]'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => string | number' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Signature '(): string' has no corresponding signature in '() => string | number'
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
var m2: [string] = y;
|
||||
~~
|
||||
!!! error TS2322: Type 'StrNum' is not assignable to type '[string]'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => string | number' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Signature '(): string' has no corresponding signature in '() => string | number'
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
var m3: [string] = z;
|
||||
~~
|
||||
!!! error TS2322: Type '{ 0: string; 1: number; }' is not assignable to type '[string]'.
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts(8,5): error TS2322: Type '[number, number, number, string]' is not assignable to type '[number, number, number]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => number | string' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '() => number | string'
|
||||
Type 'number | string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'number | string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts(14,5): error TS2322: Type 'number[]' is not assignable to type '[number, number, number]'.
|
||||
Property '0' is missing in type 'number[]'.
|
||||
|
||||
@@ -21,9 +20,8 @@ tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionConte
|
||||
!!! error TS2322: Type '[number, number, number, string]' is not assignable to type '[number, number, number]'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => number | string' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '() => number | string'
|
||||
!!! error TS2322: Type 'number | string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'number | string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
// In a contextually typed array literal expression containing one or more spread elements,
|
||||
// an element expression at index N is contextually typed by the numeric index type of the contextual type, if any.
|
||||
|
||||
@@ -6,9 +6,8 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(11,5): error
|
||||
tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(17,5): error TS2322: Type '[number, number, string, boolean]' is not assignable to type '[number, number]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => number | string | boolean' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '() => number | string | boolean'
|
||||
Type 'number | string | boolean' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'number | string | boolean' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(32,5): error TS2322: Type '(number[] | string[])[]' is not assignable to type 'tup'.
|
||||
Property '0' is missing in type '(number[] | string[])[]'.
|
||||
tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(33,5): error TS2322: Type 'number[]' is not assignable to type '[number, number, number]'.
|
||||
@@ -16,11 +15,10 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(33,5): error
|
||||
tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error TS2322: Type '(number | string)[]' is not assignable to type 'myArray'.
|
||||
Types of property 'push' are incompatible.
|
||||
Type '(...items: (number | string)[]) => number' is not assignable to type '(...items: Number[]) => number'.
|
||||
Signature '(...items: Number[]): number' has no corresponding signature in '(...items: (number | string)[]) => number'
|
||||
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'.
|
||||
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) ====
|
||||
@@ -52,9 +50,8 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error
|
||||
!!! error TS2322: Type '[number, number, string, boolean]' is not assignable to type '[number, number]'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => number | string | boolean' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '() => number | string | boolean'
|
||||
!!! error TS2322: Type 'number | string | boolean' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'number | string | boolean' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
// The resulting type an array literal expression is determined as follows:
|
||||
// - the resulting type is an array type with an element type that is the union of the types of the
|
||||
@@ -82,9 +79,8 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error
|
||||
!!! error TS2322: Type '(number | string)[]' is not assignable to type 'myArray'.
|
||||
!!! error TS2322: Types of property 'push' are incompatible.
|
||||
!!! error TS2322: Type '(...items: (number | string)[]) => number' is not assignable to type '(...items: Number[]) => number'.
|
||||
!!! error TS2322: Signature '(...items: Number[]): number' has no corresponding signature in '(...items: (number | string)[]) => number'
|
||||
!!! 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'.
|
||||
!!! 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'.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts(2,9): error TS2352: Neither type '(v: number) => number' nor type '(x: number) => string' is assignable to the other.
|
||||
Signature '(x: number): string' has no corresponding signature in '(v: number) => number'
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts (1 errors) ====
|
||||
@@ -8,5 +7,4 @@ tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts(2,9):
|
||||
var x = (v => v) as (x: number) => string;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2352: Neither type '(v: number) => number' nor type '(x: number) => string' is assignable to the other.
|
||||
!!! error TS2352: Signature '(x: number): string' has no corresponding signature in '(v: number) => number'
|
||||
!!! error TS2352: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2352: Type 'number' is not assignable to type 'string'.
|
||||
@@ -1,8 +1,7 @@
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(14,1): error TS2322: Type 'NotBoolean' is not assignable to type 'Boolean'.
|
||||
Types of property 'valueOf' are incompatible.
|
||||
Type '() => Object' is not assignable to type '() => boolean'.
|
||||
Signature '(): boolean' has no corresponding signature in '() => Object'
|
||||
Type 'Object' is not assignable to type 'boolean'.
|
||||
Type 'Object' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(19,1): error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(20,1): error TS2322: Type 'NotBoolean' is not assignable to type 'boolean'.
|
||||
|
||||
@@ -26,8 +25,7 @@ tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(
|
||||
!!! error TS2322: Type 'NotBoolean' is not assignable to type 'Boolean'.
|
||||
!!! error TS2322: Types of property 'valueOf' are incompatible.
|
||||
!!! error TS2322: Type '() => Object' is not assignable to type '() => boolean'.
|
||||
!!! error TS2322: Signature '(): boolean' has no corresponding signature in '() => Object'
|
||||
!!! error TS2322: Type 'Object' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'Object' is not assignable to type 'boolean'.
|
||||
|
||||
b = a;
|
||||
b = x;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2322: Type '[number, string]' is not assignable to type 'number[]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => number | string' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '() => number | string'
|
||||
Type 'number | string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'number | string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2322: Type '{}[]' is not assignable to type '[{}]'.
|
||||
Property '0' is missing in type '{}[]'.
|
||||
|
||||
@@ -30,9 +29,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! error TS2322: Type '[number, string]' is not assignable to type 'number[]'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => number | string' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '() => number | string'
|
||||
!!! error TS2322: Type 'number | string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'number | string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
emptyObjTuple = emptyObjArray;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{}[]' is not assignable to type '[{}]'.
|
||||
|
||||
@@ -3,12 +3,10 @@ tests/cases/compiler/assignmentCompatBug5.ts(2,8): error TS2345: Argument of typ
|
||||
tests/cases/compiler/assignmentCompatBug5.ts(5,6): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'number[]'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/assignmentCompatBug5.ts(8,6): error TS2345: Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'.
|
||||
Signature '(n: number): number' has no corresponding signature in '(s: string) => void'
|
||||
Types of parameters 's' and 'n' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 's' and 'n' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/assignmentCompatBug5.ts(9,6): error TS2345: Argument of type '(n: number) => void' is not assignable to parameter of type '(n: number) => number'.
|
||||
Signature '(n: number): number' has no corresponding signature in '(n: number) => void'
|
||||
Type 'void' is not assignable to type 'number'.
|
||||
Type 'void' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatBug5.ts (4 errors) ====
|
||||
@@ -28,13 +26,11 @@ tests/cases/compiler/assignmentCompatBug5.ts(9,6): error TS2345: Argument of typ
|
||||
foo3((s:string) => { });
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'.
|
||||
!!! error TS2345: Signature '(n: number): number' has no corresponding signature in '(s: string) => void'
|
||||
!!! error TS2345: Types of parameters 's' and 'n' are incompatible.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2345: Types of parameters 's' and 'n' are incompatible.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
foo3((n) => { return; });
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(n: number) => void' is not assignable to parameter of type '(n: number) => number'.
|
||||
!!! error TS2345: Signature '(n: number): number' has no corresponding signature in '(n: number) => void'
|
||||
!!! error TS2345: Type 'void' is not assignable to type 'number'.
|
||||
!!! error TS2345: Type 'void' is not assignable to type 'number'.
|
||||
|
||||
|
||||
@@ -1,35 +1,27 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(35,1): error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
Signature '(x: number): void' has no corresponding signature in 'S2'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(36,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(37,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x: string) => number'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(38,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x: string) => string'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(39,1): error TS2322: Type 'S2' is not assignable to type '(x: number) => void'.
|
||||
Signature '(x: number): void' has no corresponding signature in 'S2'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(40,1): error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(41,1): error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x: string) => number'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(42,1): error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x: string) => string'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts (8 errors) ====
|
||||
@@ -70,49 +62,41 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
t = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in 'S2'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type 'T'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x: string) => number'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
t = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x: string) => string'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = s2;
|
||||
~
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in 'S2'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x: string) => number'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = function (x: string) { return ''; }
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x: string) => string'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -9,15 +9,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(42,1): error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(43,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(45,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'.
|
||||
@@ -25,15 +23,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(46,1): error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(47,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(48,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
Property 'f' is missing in type '(x: string) => number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(49,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }'.
|
||||
@@ -99,17 +95,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! error TS2322: Type 'S2' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
t = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
t = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'.
|
||||
@@ -123,17 +117,15 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
!!! error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = a3;
|
||||
~
|
||||
!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = (x: string) => 1;
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'.
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Signature '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived): (r: Base) => Derived' has no corresponding signature in '<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: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Signature '(arg2: Base): Derived' has no corresponding signature in '(arg2: { foo: number; }) => any'
|
||||
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'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
Signature '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U): (r: T) => U' has no corresponding signature in '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts (2 errors) ====
|
||||
@@ -68,20 +65,17 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a8 = b8; // error, { foo: number } and Base are incompatible
|
||||
~~
|
||||
!!! error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2322: Signature '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived): (r: Base) => Derived' has no corresponding signature in '<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: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2322: Signature '(arg2: Base): Derived' has no corresponding signature in '(arg2: { foo: number; }) => any'
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
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: Signature '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U): (r: T) => U' has no corresponding signature in '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
!!! 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'.
|
||||
|
||||
|
||||
var b10: <T extends Derived>(...x: T[]) => T;
|
||||
|
||||
-14
@@ -1,17 +1,10 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(16,5): error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '(x: number) => number'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(19,5): error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '(x: number) => number'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(20,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '(x: number, y?: number) => number'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(22,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '(x: number, y: number) => number'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(33,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'.
|
||||
Signature '(x?: number): number' has no corresponding signature in '(x: number, y: number) => number'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(39,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
Signature '(x: number): number' has no corresponding signature in '(x: number, y: number) => number'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
Signature '(x: number): number' has no corresponding signature in '(x: number, y: number) => number'
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts (7 errors) ====
|
||||
@@ -33,22 +26,18 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = (x: number) => 1; // error, too many required params
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '(x: number) => number'
|
||||
a = b.a; // ok
|
||||
a = b.a2; // ok
|
||||
a = b.a3; // error
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '(x: number) => number'
|
||||
a = b.a4; // error
|
||||
~
|
||||
!!! error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '(x: number, y?: number) => number'
|
||||
a = b.a5; // ok
|
||||
a = b.a6; // error
|
||||
~
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '(x: number, y: number) => number'
|
||||
|
||||
var a2: (x?: number) => number;
|
||||
a2 = () => 1; // ok, same number of required params
|
||||
@@ -62,7 +51,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'.
|
||||
!!! error TS2322: Signature '(x?: number): number' has no corresponding signature in '(x: number, y: number) => number'
|
||||
|
||||
var a3: (x: number) => number;
|
||||
a3 = () => 1; // ok, fewer required params
|
||||
@@ -71,7 +59,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = (x: number, y: number) => 1; // error, too many required params
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2322: Signature '(x: number): number' has no corresponding signature in '(x: number, y: number) => number'
|
||||
a3 = b.a; // ok
|
||||
a3 = b.a2; // ok
|
||||
a3 = b.a3; // ok
|
||||
@@ -80,7 +67,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2322: Signature '(x: number): number' has no corresponding signature in '(x: number, y: number) => number'
|
||||
|
||||
var a4: (x: number, y?: number) => number;
|
||||
a4 = () => 1; // ok, fewer required params
|
||||
|
||||
+36
-54
@@ -1,39 +1,30 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
Signature '(...args: number[]): number' has no corresponding signature in '(...args: string[]) => number'
|
||||
Types of parameters 'args' and 'args' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'args' and 'args' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
Signature '(...args: number[]): number' has no corresponding signature in '(x?: string) => number'
|
||||
Types of parameters 'x' and 'args' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'args' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(26,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'.
|
||||
Signature '(x: number, ...z: number[]): number' has no corresponding signature in '(x: number, ...args: string[]) => number'
|
||||
Types of parameters 'args' and 'z' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'args' and 'z' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(35,5): error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Signature '(x: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x: number, y?: number, z?: number) => number'
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(36,5): error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Signature '(x: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x: number, ...z: number[]) => number'
|
||||
Types of parameters 'z' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'z' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(37,5): error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
Signature '(x: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x: string, y?: string, z?: string) => number'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(41,5): error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Signature '(x?: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x?: number, y?: number) => number'
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(43,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Signature '(x?: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x: number, y?: number) => number'
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(45,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
Signature '(x?: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x: number, ...args: string[]) => number'
|
||||
Types of parameters 'args' and 'z' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'args' and 'z' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts (9 errors) ====
|
||||
@@ -52,18 +43,16 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = (...args: string[]) => 1; // error, type mismatch
|
||||
~
|
||||
!!! error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
!!! error TS2322: Signature '(...args: number[]): number' has no corresponding signature in '(...args: string[]) => number'
|
||||
!!! error TS2322: Types of parameters 'args' and 'args' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'args' and 'args' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a = (x?: number) => 1; // ok, same number of required params
|
||||
a = (x?: number, y?: number, z?: number) => 1; // ok, same number of required params
|
||||
a = (x: number) => 1; // ok, rest param corresponds to infinite number of params
|
||||
a = (x?: string) => 1; // error, incompatible type
|
||||
~
|
||||
!!! error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'.
|
||||
!!! error TS2322: Signature '(...args: number[]): number' has no corresponding signature in '(x?: string) => number'
|
||||
!!! error TS2322: Types of parameters 'x' and 'args' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'args' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
var a2: (x: number, ...z: number[]) => number;
|
||||
@@ -75,9 +64,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = (x: number, ...args: string[]) => 1; // should be type mismatch error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'.
|
||||
!!! error TS2322: Signature '(x: number, ...z: number[]): number' has no corresponding signature in '(x: number, ...args: string[]) => number'
|
||||
!!! error TS2322: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
a2 = (x: number, y: number) => 1; // ok, rest param corresponds to infinite number of params
|
||||
a2 = (x: number, y?: number) => 1; // ok, same number of required params
|
||||
|
||||
@@ -89,41 +77,35 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = (x: number, y?: number, z?: number) => 1; // error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Signature '(x: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x: number, y?: number, z?: number) => number'
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
a3 = (x: number, ...z: number[]) => 1; // error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Signature '(x: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x: number, ...z: number[]) => number'
|
||||
!!! error TS2322: Types of parameters 'z' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'z' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
a3 = (x: string, y?: string, z?: string) => 1; // error
|
||||
~~
|
||||
!!! error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Signature '(x: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x: string, y?: string, z?: string) => number'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
var a4: (x?: number, y?: string, ...z: number[]) => number;
|
||||
a4 = () => 1; // ok, fewer required params
|
||||
a4 = (x?: number, y?: number) => 1; // error, type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Signature '(x?: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x?: number, y?: number) => number'
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
a4 = (x: number) => 1; // ok, all present params match
|
||||
a4 = (x: number, y?: number) => 1; // error, second param has type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Signature '(x?: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x: number, y?: number) => number'
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
a4 = (x?: number, y?: string) => 1; // ok, same number of required params with matching types
|
||||
a4 = (x: number, ...args: string[]) => 1; // error, rest params have type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'.
|
||||
!!! error TS2322: Signature '(x?: number, y?: string, ...z: number[]): number' has no corresponding signature in '(x: number, ...args: string[]) => number'
|
||||
!!! error TS2322: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'args' and 'z' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,34 +1,27 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(52,9): error TS2322: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Signature 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived): (r: Base) => Derived' has no corresponding signature in '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: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Signature '(arg2: Base): Derived' has no corresponding signature in '(arg2: { foo: number; }) => any'
|
||||
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'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(53,9): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
||||
Signature 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U): (r: T) => U' has no corresponding signature in 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
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[]; }'.
|
||||
Signature 'new (x: { new (a: number): number; new (a?: number): number; }): number[]' has no corresponding signature in 'new <T>(x: (a: T) => T) => T[]'
|
||||
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; }'.
|
||||
Signature 'new (a: number): number' has no corresponding signature in '(a: any) => any'
|
||||
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; }'.
|
||||
Signature 'new (a: number): number' has no corresponding signature in '(a: any) => any'
|
||||
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[]'.
|
||||
Signature 'new <T>(x: (a: T) => T): T[]' has no corresponding signature in '{ 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 '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2322: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
Signature 'new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]' has no corresponding signature in 'new <T>(x: (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; }'.
|
||||
Signature 'new <T extends Derived>(a: T): T' has no corresponding signature in '(a: any) => 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; }'.
|
||||
Signature 'new <T extends Derived>(a: T): T' has no corresponding signature in '(a: any) => any'
|
||||
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[]'.
|
||||
Signature 'new <T>(x: (a: T) => T): any[]' has no corresponding signature in '{ 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 '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => 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'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts (6 errors) ====
|
||||
@@ -86,20 +79,17 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a8 = b8; // error, type mismatch
|
||||
~~
|
||||
!!! error TS2322: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2322: Signature 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived): (r: Base) => Derived' has no corresponding signature in '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: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2322: Signature '(arg2: Base): Derived' has no corresponding signature in '(arg2: { foo: number; }) => any'
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
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: Signature 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U): (r: T) => U' has no corresponding signature in 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'.
|
||||
!!! 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'.
|
||||
|
||||
|
||||
var b10: new <T extends Derived>(...x: T[]) => T;
|
||||
@@ -126,31 +116,27 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a16 = b16; // error
|
||||
~~~
|
||||
!!! error TS2322: Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'.
|
||||
!!! error TS2322: Signature 'new (x: { new (a: number): number; new (a?: number): number; }): number[]' has no corresponding signature in 'new <T>(x: (a: T) => T) => T[]'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
!!! error TS2322: Signature 'new (a: number): number' has no corresponding signature in '(a: any) => any'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'.
|
||||
!!! error TS2322: Signature 'new (a: number): number' has no corresponding signature in '(a: any) => any'
|
||||
b16 = a16; // error
|
||||
~~~
|
||||
!!! error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]'.
|
||||
!!! error TS2322: Signature 'new <T>(x: (a: T) => T): T[]' has no corresponding signature in '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'.
|
||||
!!! 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'.
|
||||
|
||||
var b17: new <T>(x: (a: T) => T) => any[];
|
||||
a17 = b17; // error
|
||||
~~~
|
||||
!!! error TS2322: Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'.
|
||||
!!! error TS2322: Signature 'new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]' has no corresponding signature in 'new <T>(x: (a: T) => T) => any[]'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
!!! error TS2322: Signature 'new <T extends Derived>(a: T): T' has no corresponding signature in '(a: any) => any'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'.
|
||||
!!! error TS2322: Signature 'new <T extends Derived>(a: T): T' has no corresponding signature in '(a: any) => any'
|
||||
b17 = a17; // error
|
||||
~~~
|
||||
!!! error TS2322: Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]'.
|
||||
!!! error TS2322: Signature 'new <T>(x: (a: T) => T): any[]' has no corresponding signature in '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => 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'.
|
||||
}
|
||||
|
||||
module WithGenericSignaturesInBaseType {
|
||||
|
||||
-10
@@ -1,13 +1,8 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(16,5): error TS2322: Type 'new (x: number) => number' is not assignable to type 'new () => number'.
|
||||
Signature 'new (): number' has no corresponding signature in 'new (x: number) => number'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(17,5): error TS2322: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'.
|
||||
Signature 'new (): number' has no corresponding signature in 'new (x: number, y?: number) => number'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(19,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'.
|
||||
Signature 'new (): number' has no corresponding signature in 'new (x: number, y: number) => number'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(27,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'.
|
||||
Signature 'new (x?: number): number' has no corresponding signature in 'new (x: number, y: number) => number'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
|
||||
Signature 'new (x: number): number' has no corresponding signature in 'new (x: number, y: number) => number'
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts (5 errors) ====
|
||||
@@ -29,16 +24,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a = b.a3; // error
|
||||
~
|
||||
!!! error TS2322: Type 'new (x: number) => number' is not assignable to type 'new () => number'.
|
||||
!!! error TS2322: Signature 'new (): number' has no corresponding signature in 'new (x: number) => number'
|
||||
a = b.a4; // error
|
||||
~
|
||||
!!! error TS2322: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'.
|
||||
!!! error TS2322: Signature 'new (): number' has no corresponding signature in 'new (x: number, y?: number) => number'
|
||||
a = b.a5; // ok
|
||||
a = b.a6; // error
|
||||
~
|
||||
!!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'.
|
||||
!!! error TS2322: Signature 'new (): number' has no corresponding signature in 'new (x: number, y: number) => number'
|
||||
|
||||
var a2: new (x?: number) => number;
|
||||
a2 = b.a; // ok
|
||||
@@ -49,7 +41,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a2 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'.
|
||||
!!! error TS2322: Signature 'new (x?: number): number' has no corresponding signature in 'new (x: number, y: number) => number'
|
||||
|
||||
var a3: new (x: number) => number;
|
||||
a3 = b.a; // ok
|
||||
@@ -60,7 +51,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
a3 = b.a6; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
|
||||
!!! error TS2322: Signature 'new (x: number): number' has no corresponding signature in 'new (x: number, y: number) => number'
|
||||
|
||||
var a4: new (x: number, y?: number) => number;
|
||||
a4 = b.a; // ok
|
||||
|
||||
-12
@@ -1,15 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(14,13): error TS2322: Type '(x: T) => any' is not assignable to type '() => T'.
|
||||
Signature '(): T' has no corresponding signature in '(x: T) => any'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(23,13): error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'.
|
||||
Signature '(x: T): T' has no corresponding signature in '(x: T, y: T) => any'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(65,9): error TS2322: Type '(x: T) => T' is not assignable to type '<T>() => T'.
|
||||
Signature '<T>(): T' has no corresponding signature in '(x: T) => T'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(66,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '<T>() => T'.
|
||||
Signature '<T>(): T' has no corresponding signature in '(x: T, y?: T) => T'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(107,13): error TS2322: Type '<T>(x: T) => any' is not assignable to type '<T>() => T'.
|
||||
Signature '<T>(): T' has no corresponding signature in '<T>(x: T) => any'
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(116,13): error TS2322: Type '<T>(x: T, y: T) => any' is not assignable to type '<T>(x: T) => T'.
|
||||
Signature '<T>(x: T): T' has no corresponding signature in '<T>(x: T, y: T) => any'
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts (6 errors) ====
|
||||
@@ -29,7 +23,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a = (x: T) => null; // error, too many required params
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '(x: T) => any' is not assignable to type '() => T'.
|
||||
!!! error TS2322: Signature '(): T' has no corresponding signature in '(x: T) => any'
|
||||
|
||||
this.a2 = () => null; // ok, same T of required params
|
||||
this.a2 = (x?: T) => null; // ok, same T of required params
|
||||
@@ -41,7 +34,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a3 = (x: T, y: T) => null; // error, too many required params
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'.
|
||||
!!! error TS2322: Signature '(x: T): T' has no corresponding signature in '(x: T, y: T) => any'
|
||||
|
||||
this.a4 = () => null; // ok, fewer required params
|
||||
this.a4 = (x?: T, y?: T) => null; // ok, fewer required params
|
||||
@@ -86,11 +78,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
b.a = t.a3;
|
||||
~~~
|
||||
!!! error TS2322: Type '(x: T) => T' is not assignable to type '<T>() => T'.
|
||||
!!! error TS2322: Signature '<T>(): T' has no corresponding signature in '(x: T) => T'
|
||||
b.a = t.a4;
|
||||
~~~
|
||||
!!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '<T>() => T'.
|
||||
!!! error TS2322: Signature '<T>(): T' has no corresponding signature in '(x: T, y?: T) => T'
|
||||
b.a = t.a5;
|
||||
|
||||
b.a2 = t.a;
|
||||
@@ -134,7 +124,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a = <T>(x: T) => null; // error, too many required params
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '<T>(x: T) => any' is not assignable to type '<T>() => T'.
|
||||
!!! error TS2322: Signature '<T>(): T' has no corresponding signature in '<T>(x: T) => any'
|
||||
|
||||
this.a2 = <T>() => null; // ok, same T of required params
|
||||
this.a2 = <T>(x?: T) => null; // ok, same T of required params
|
||||
@@ -146,7 +135,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
||||
this.a3 = <T>(x: T, y: T) => null; // error, too many required params
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '<T>(x: T, y: T) => any' is not assignable to type '<T>(x: T) => T'.
|
||||
!!! error TS2322: Signature '<T>(x: T): T' has no corresponding signature in '<T>(x: T, y: T) => any'
|
||||
|
||||
this.a4 = <T>() => null; // ok, fewer required params
|
||||
this.a4 = <T>(x?: T, y?: T) => null; // ok, fewer required params
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
Signature '(s1: string): number' has no corresponding signature in '(x: string) => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(19,1): error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number'.
|
||||
Signature '(s1: string): number' has no corresponding signature in '(x: number) => number'
|
||||
Types of parameters 'x' and 's1' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 's1' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'.
|
||||
Signature '(s1: string): number' has no corresponding signature in '{ (x: string): string; (x: number): number; }'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void'.
|
||||
Signature 'new (x: number): void' has no corresponding signature in 'typeof C'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatWithOverloads.ts (4 errors) ====
|
||||
@@ -34,21 +30,18 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type
|
||||
g = f2; // Error
|
||||
~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2322: Signature '(s1: string): number' has no corresponding signature in '(x: string) => string'
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
g = f3; // Error
|
||||
~
|
||||
!!! error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2322: Signature '(s1: string): number' has no corresponding signature in '(x: number) => number'
|
||||
!!! error TS2322: Types of parameters 'x' and 's1' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'x' and 's1' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
g = f4; // Error
|
||||
~
|
||||
!!! error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'.
|
||||
!!! error TS2322: Signature '(s1: string): number' has no corresponding signature in '{ (x: string): string; (x: number): number; }'
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
class C {
|
||||
constructor(x: string);
|
||||
@@ -60,6 +53,5 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type
|
||||
d = C; // Error
|
||||
~
|
||||
!!! error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void'.
|
||||
!!! error TS2322: Signature 'new (x: number): void' has no corresponding signature in 'typeof C'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -3,12 +3,10 @@ tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,16): error TS1055: Type 'number' is not a valid async function return type.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,16): error TS1055: Type 'PromiseLike' is not a valid async function return type.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,16): error TS1055: Type 'typeof Thenable' is not a valid async function return type.
|
||||
Signature 'new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): PromiseLike<T>' has no corresponding signature in 'typeof Thenable'
|
||||
Type 'Thenable' is not assignable to type 'PromiseLike<any>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '() => void' is not assignable to type '{ <TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>; <TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>; }'.
|
||||
Signature '<TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>' has no corresponding signature in '() => void'
|
||||
Type 'void' is not assignable to type 'PromiseLike<any>'.
|
||||
Type 'Thenable' is not assignable to type 'PromiseLike<any>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '() => void' is not assignable to type '{ <TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>; <TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>; }'.
|
||||
Type 'void' is not assignable to type 'PromiseLike<any>'.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member.
|
||||
tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member.
|
||||
|
||||
@@ -34,12 +32,10 @@ tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1
|
||||
async function fn6(): Thenable { } // error
|
||||
~~~
|
||||
!!! error TS1055: Type 'typeof Thenable' is not a valid async function return type.
|
||||
!!! error TS1055: Signature 'new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): PromiseLike<T>' has no corresponding signature in 'typeof Thenable'
|
||||
!!! error TS1055: Type 'Thenable' is not assignable to type 'PromiseLike<any>'.
|
||||
!!! error TS1055: Types of property 'then' are incompatible.
|
||||
!!! error TS1055: Type '() => void' is not assignable to type '{ <TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>; <TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>; }'.
|
||||
!!! error TS1055: Signature '<TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>' has no corresponding signature in '() => void'
|
||||
!!! error TS1055: Type 'void' is not assignable to type 'PromiseLike<any>'.
|
||||
!!! error TS1055: Type 'Thenable' is not assignable to type 'PromiseLike<any>'.
|
||||
!!! error TS1055: Types of property 'then' are incompatible.
|
||||
!!! error TS1055: Type '() => void' is not assignable to type '{ <TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>; <TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>; }'.
|
||||
!!! error TS1055: Type 'void' is not assignable to type 'PromiseLike<any>'.
|
||||
async function fn7() { return; } // valid: Promise<void>
|
||||
async function fn8() { return 1; } // valid: Promise<number>
|
||||
async function fn9() { return null; } // valid: Promise<any>
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
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'.
|
||||
Signature '(): boolean' has no corresponding signature in '() => number'
|
||||
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'.
|
||||
Signature '(): boolean' has no corresponding signature in '() => string'
|
||||
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'.
|
||||
Signature '(): boolean' has no corresponding signature in '() => Object'
|
||||
Type 'Object' is not assignable to type 'boolean'.
|
||||
Type 'Object' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/booleanAssignment.ts (3 errors) ====
|
||||
@@ -22,22 +19,19 @@ tests/cases/compiler/booleanAssignment.ts(4,1): error TS2322: Type '{}' is not a
|
||||
!!! 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: Signature '(): boolean' has no corresponding signature in '() => number'
|
||||
!!! 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: Signature '(): boolean' has no corresponding signature in '() => string'
|
||||
!!! 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'.
|
||||
!!! error TS2322: Types of property 'valueOf' are incompatible.
|
||||
!!! error TS2322: Type '() => Object' is not assignable to type '() => boolean'.
|
||||
!!! error TS2322: Signature '(): boolean' has no corresponding signature in '() => Object'
|
||||
!!! error TS2322: Type 'Object' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'Object' is not assignable to type 'boolean'.
|
||||
|
||||
var o = {};
|
||||
o = b; // OK
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts(57,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
Types of property 'a' are incompatible.
|
||||
Type '(x: number) => string' is not assignable to type '(x: number) => number'.
|
||||
Signature '(x: number): number' has no corresponding signature in '(x: number) => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts (1 errors) ====
|
||||
@@ -67,8 +66,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign
|
||||
!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
!!! error TS2430: Types of property 'a' are incompatible.
|
||||
!!! error TS2430: Type '(x: number) => string' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2430: Signature '(x: number): number' has no corresponding signature in '(x: number) => string'
|
||||
!!! error TS2430: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2430: Type 'string' is not assignable to type 'number'.
|
||||
// N's
|
||||
a: (x: number) => string; // error because base returns non-void;
|
||||
}
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(51,19): error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
Types of property 'a2' are incompatible.
|
||||
Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]'.
|
||||
Signature '(x: number): string[]' has no corresponding signature in '(x: T) => U[]'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(60,19): error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
Types of property 'a8' are incompatible.
|
||||
Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Signature '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived): (r: Base) => Derived' has no corresponding signature in '<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: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Signature '(arg2: Base): Derived' has no corresponding signature in '(arg2: { foo: number; }) => any'
|
||||
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'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts (2 errors) ====
|
||||
@@ -73,9 +70,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign
|
||||
!!! error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a2' are incompatible.
|
||||
!!! error TS2430: Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]'.
|
||||
!!! error TS2430: Signature '(x: number): string[]' has no corresponding signature in '(x: T) => U[]'
|
||||
!!! error TS2430: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2430: Type 'T' is not assignable to type 'number'.
|
||||
!!! error TS2430: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2430: Type 'T' is not assignable to type 'number'.
|
||||
a2: (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic
|
||||
}
|
||||
|
||||
@@ -89,14 +85,12 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign
|
||||
!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a8' are incompatible.
|
||||
!!! error TS2430: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2430: Signature '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived): (r: Base) => Derived' has no corresponding signature in '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'
|
||||
!!! error TS2430: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2430: Signature '(arg2: Base): Derived' has no corresponding signature in '(arg2: { foo: number; }) => any'
|
||||
!!! 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'.
|
||||
!!! error TS2430: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2430: Types of property 'foo' are incompatible.
|
||||
!!! error TS2430: Type 'number' is not assignable to type 'string'.
|
||||
a8: <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,8 @@ tests/cases/conformance/types/tuple/castingTuple.ts(30,5): error TS2403: Subsequ
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(30,14): error TS2352: Neither type '[number, string]' nor type 'number[]' is assignable to the other.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => number | string' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '() => number | string'
|
||||
Type 'number | string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'number | string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/tuple/castingTuple.ts(31,1): error TS2304: Cannot find name 't4'.
|
||||
|
||||
|
||||
@@ -71,9 +70,8 @@ tests/cases/conformance/types/tuple/castingTuple.ts(31,1): error TS2304: Cannot
|
||||
!!! error TS2352: Neither type '[number, string]' nor type 'number[]' is assignable to the other.
|
||||
!!! error TS2352: Types of property 'pop' are incompatible.
|
||||
!!! error TS2352: Type '() => number | string' is not assignable to type '() => number'.
|
||||
!!! error TS2352: Signature '(): number' has no corresponding signature in '() => number | string'
|
||||
!!! error TS2352: Type 'number | string' is not assignable to type 'number'.
|
||||
!!! error TS2352: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2352: Type 'number | string' is not assignable to type 'number'.
|
||||
!!! error TS2352: Type 'string' is not assignable to type 'number'.
|
||||
t4[2] = 10;
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 't4'.
|
||||
|
||||
+4
-6
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,59): error TS2345: Argument of type '(c: C) => B' is not assignable to parameter of type '(x: C) => C'.
|
||||
Signature '(x: C): C' has no corresponding signature in '(c: C) => B'
|
||||
Type 'B' is not assignable to type 'C'.
|
||||
Property 'z' is missing in type 'B'.
|
||||
Type 'B' is not assignable to type 'C'.
|
||||
Property 'z' is missing in type 'B'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts (1 errors) ====
|
||||
@@ -26,6 +25,5 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParamete
|
||||
(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A);
|
||||
~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(c: C) => B' is not assignable to parameter of type '(x: C) => C'.
|
||||
!!! error TS2345: Signature '(x: C): C' has no corresponding signature in '(c: C) => B'
|
||||
!!! error TS2345: Type 'B' is not assignable to type 'C'.
|
||||
!!! error TS2345: Property 'z' is missing in type 'B'.
|
||||
!!! error TS2345: Type 'B' is not assignable to type 'C'.
|
||||
!!! error TS2345: Property 'z' is missing in type 'B'.
|
||||
+4
-8
@@ -1,9 +1,7 @@
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(7,43): error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'.
|
||||
Signature '(x: S): S' has no corresponding signature in '(ss: S) => T'
|
||||
Type 'T' is not assignable to type 'S'.
|
||||
Type 'T' is not assignable to type 'S'.
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(10,29): error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'.
|
||||
Signature '(x: S): S' has no corresponding signature in '(ss: S) => T'
|
||||
Type 'T' is not assignable to type 'S'.
|
||||
Type 'T' is not assignable to type 'S'.
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(32,9): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(36,9): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -19,15 +17,13 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParamete
|
||||
(new Chain(t)).then(tt => s).then(ss => t);
|
||||
~~~~~~~
|
||||
!!! error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'.
|
||||
!!! error TS2345: Signature '(x: S): S' has no corresponding signature in '(ss: S) => T'
|
||||
!!! error TS2345: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2345: Type 'T' is not assignable to type 'S'.
|
||||
|
||||
// But error to try to climb up the chain
|
||||
(new Chain(s)).then(ss => t);
|
||||
~~~~~~~
|
||||
!!! error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'.
|
||||
!!! error TS2345: Signature '(x: S): S' has no corresponding signature in '(ss: S) => T'
|
||||
!!! error TS2345: Type 'T' is not assignable to type 'S'.
|
||||
!!! error TS2345: Type 'T' is not assignable to type 'S'.
|
||||
|
||||
// Staying at T or S should be fine
|
||||
(new Chain(t)).then(tt => t).then(tt => t).then(tt => t);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
tests/cases/compiler/classSideInheritance3.ts(16,5): error TS2322: Type 'typeof B' is not assignable to type 'typeof A'.
|
||||
Signature 'new (x: string): A' has no corresponding signature in 'typeof B'
|
||||
tests/cases/compiler/classSideInheritance3.ts(17,5): error TS2322: Type 'typeof B' is not assignable to type 'new (x: string) => A'.
|
||||
Signature 'new (x: string): A' has no corresponding signature in 'typeof B'
|
||||
|
||||
|
||||
==== tests/cases/compiler/classSideInheritance3.ts (2 errors) ====
|
||||
@@ -23,9 +21,7 @@ tests/cases/compiler/classSideInheritance3.ts(17,5): error TS2322: Type 'typeof
|
||||
var r1: typeof A = B; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'typeof B' is not assignable to type 'typeof A'.
|
||||
!!! error TS2322: Signature 'new (x: string): A' has no corresponding signature in 'typeof B'
|
||||
var r2: new (x: string) => A = B; // error
|
||||
~~
|
||||
!!! error TS2322: Type 'typeof B' is not assignable to type 'new (x: string) => A'.
|
||||
!!! error TS2322: Signature 'new (x: string): A' has no corresponding signature in 'typeof B'
|
||||
var r3: typeof A = C; // ok
|
||||
@@ -6,16 +6,13 @@ tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithou
|
||||
Property 'propertyB' is missing in type 'A'.
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(19,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number'.
|
||||
Type '(n: X) => string' is not assignable to type '(t: X) => number'.
|
||||
Signature '(t: X): number' has no corresponding signature in '(n: X) => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(20,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string'.
|
||||
Type '(m: X) => number' is not assignable to type '(t: X) => string'.
|
||||
Signature '(t: X): string' has no corresponding signature in '(m: X) => number'
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts(21,5): error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean'.
|
||||
Type '(m: X) => number' is not assignable to type '(t: X) => boolean'.
|
||||
Signature '(t: X): boolean' has no corresponding signature in '(m: X) => number'
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithoutIdenticalBCT.ts (5 errors) ====
|
||||
@@ -49,19 +46,16 @@ tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorWithou
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => number'.
|
||||
!!! error TS2322: Type '(n: X) => string' is not assignable to type '(t: X) => number'.
|
||||
!!! error TS2322: Signature '(t: X): number' has no corresponding signature in '(n: X) => string'
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
var result5: (t: X) => string = true ? (m) => m.propertyX1 : (n) => n.propertyX2;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => string'.
|
||||
!!! error TS2322: Type '(m: X) => number' is not assignable to type '(t: X) => string'.
|
||||
!!! error TS2322: Signature '(t: X): string' has no corresponding signature in '(m: X) => number'
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
var result6: (t: X) => boolean = true ? (m) => m.propertyX1 : (n) => n.propertyX2;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '((m: X) => number) | ((n: X) => string)' is not assignable to type '(t: X) => boolean'.
|
||||
!!! error TS2322: Type '(m: X) => number' is not assignable to type '(t: X) => boolean'.
|
||||
!!! error TS2322: Signature '(t: X): boolean' has no corresponding signature in '(m: X) => number'
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
var result61: (t: X) => number| string = true ? (m) => m.propertyX1 : (n) => n.propertyX2;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts(61,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
Types of property 'a' are incompatible.
|
||||
Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number'.
|
||||
Signature 'new (x: number): number' has no corresponding signature in 'new (x: number) => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts (1 errors) ====
|
||||
@@ -71,8 +70,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc
|
||||
!!! error TS2430: Interface 'I2' incorrectly extends interface 'Base2'.
|
||||
!!! error TS2430: Types of property 'a' are incompatible.
|
||||
!!! error TS2430: Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number'.
|
||||
!!! error TS2430: Signature 'new (x: number): number' has no corresponding signature in 'new (x: number) => string'
|
||||
!!! error TS2430: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2430: Type 'string' is not assignable to type 'number'.
|
||||
// N's
|
||||
a: new (x: number) => string; // error because base returns non-void;
|
||||
}
|
||||
|
||||
+16
-22
@@ -1,20 +1,17 @@
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(41,19): error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
Types of property 'a2' are incompatible.
|
||||
Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]'.
|
||||
Signature 'new (x: number): string[]' has no corresponding signature in 'new (x: T) => U[]'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts(50,19): error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
Types of property 'a8' are incompatible.
|
||||
Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
Signature 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived): (r: Base) => Derived' has no corresponding signature in '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: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Signature '(arg2: Base): Derived' has no corresponding signature in '(arg2: { foo: number; }) => any'
|
||||
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'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts (2 errors) ====
|
||||
@@ -63,9 +60,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc
|
||||
!!! error TS2430: Interface 'I2<T, U>' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a2' are incompatible.
|
||||
!!! error TS2430: Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]'.
|
||||
!!! error TS2430: Signature 'new (x: number): string[]' has no corresponding signature in 'new (x: T) => U[]'
|
||||
!!! error TS2430: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2430: Type 'T' is not assignable to type 'number'.
|
||||
!!! error TS2430: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2430: Type 'T' is not assignable to type 'number'.
|
||||
a2: new (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic
|
||||
}
|
||||
|
||||
@@ -79,14 +75,12 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/construc
|
||||
!!! error TS2430: Interface 'I4' incorrectly extends interface 'A'.
|
||||
!!! error TS2430: Types of property 'a8' are incompatible.
|
||||
!!! error TS2430: Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
||||
!!! error TS2430: Signature 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived): (r: Base) => Derived' has no corresponding signature in 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'
|
||||
!!! error TS2430: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2430: Signature '(arg2: Base): Derived' has no corresponding signature in '(arg2: { foo: number; }) => any'
|
||||
!!! 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'.
|
||||
!!! error TS2430: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2430: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'.
|
||||
!!! error TS2430: Types of parameters 'arg2' and 'arg2' are incompatible.
|
||||
!!! error TS2430: Type '{ foo: number; }' is not assignable to type 'Base'.
|
||||
!!! error TS2430: Types of property 'foo' are incompatible.
|
||||
!!! error TS2430: Type 'number' is not assignable to type 'string'.
|
||||
a8: new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(3,5): error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => number | string | boolean' is not assignable to type '() => number | string'.
|
||||
Signature '(): number | string' has no corresponding signature in '() => number | string | boolean'
|
||||
Type 'number | string | boolean' is not assignable to type 'number | string'.
|
||||
Type 'boolean' is not assignable to type 'number | string'.
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
Type 'number | string | boolean' is not assignable to type 'number | string'.
|
||||
Type 'boolean' is not assignable to type 'number | string'.
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(15,1): error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(18,1): error TS2322: Type '[{}, number]' is not assignable to type '[{ a: string; }, number]'.
|
||||
Types of property '0' are incompatible.
|
||||
@@ -15,9 +14,8 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(19,1): error TS23
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(20,5): error TS2322: Type '[string, string, number]' is not assignable to type '[string, string]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '() => string | number'
|
||||
Type 'string | number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'string | number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(24,1): error TS2322: Type '[C, string | number]' is not assignable to type '[C, string | number, D]'.
|
||||
Property '2' is missing in type '[C, string | number]'.
|
||||
tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(25,1): error TS2322: Type '[number, string | number]' is not assignable to type '[number, string]'.
|
||||
@@ -34,10 +32,9 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(25,1): error TS23
|
||||
!!! error TS2322: Type '[number, string, boolean]' is not assignable to type '[number, string]'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => number | string | boolean' is not assignable to type '() => number | string'.
|
||||
!!! error TS2322: Signature '(): number | string' has no corresponding signature in '() => number | string | boolean'
|
||||
!!! error TS2322: Type 'number | string | boolean' is not assignable to type 'number | string'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'number | string'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number | string | boolean' is not assignable to type 'number | string'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'number | string'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
|
||||
var numStrBoolTuple: [number, string, boolean] = [5, "foo", true];
|
||||
var objNumTuple: [{ a: string }, number] = [{ a: "world" }, 5];
|
||||
var strTupleTuple: [string, [number, {}]] = ["bar", [5, { x: 1, y: 1 }]];
|
||||
@@ -69,9 +66,8 @@ tests/cases/conformance/types/tuple/contextualTypeWithTuple.ts(25,1): error TS23
|
||||
!!! error TS2322: Type '[string, string, number]' is not assignable to type '[string, string]'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => string | number' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Signature '(): string' has no corresponding signature in '() => string | number'
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
unionTuple = unionTuple1;
|
||||
unionTuple = unionTuple2;
|
||||
|
||||
@@ -27,9 +27,8 @@ tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts(
|
||||
Type '{ commonMethodDifferentReturnType: (a: string, b: number) => string | number; }' is not assignable to type 'I21'.
|
||||
Types of property 'commonMethodDifferentReturnType' are incompatible.
|
||||
Type '(a: string, b: number) => string | number' is not assignable to type '(a: string, b: number) => number'.
|
||||
Signature '(a: string, b: number): number' has no corresponding signature in '(a: string, b: number) => string | number'
|
||||
Type 'string | number' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string | number' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts (6 errors) ====
|
||||
@@ -125,8 +124,7 @@ tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts(
|
||||
!!! error TS2322: Type '{ commonMethodDifferentReturnType: (a: string, b: number) => string | number; }' is not assignable to type 'I21'.
|
||||
!!! error TS2322: Types of property 'commonMethodDifferentReturnType' are incompatible.
|
||||
!!! error TS2322: Type '(a: string, b: number) => string | number' is not assignable to type '(a: string, b: number) => number'.
|
||||
!!! error TS2322: Signature '(a: string, b: number): number' has no corresponding signature in '(a: string, b: number) => string | number'
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string | number' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
commonMethodDifferentReturnType: (a, b) => strOrNumber,
|
||||
};
|
||||
@@ -1,15 +1,13 @@
|
||||
tests/cases/compiler/contextualTyping24.ts(1,55): error TS2322: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number'.
|
||||
Signature '(a: { (): number; (i: number): number; }): number' has no corresponding signature in '(a: string) => number'
|
||||
Types of parameters 'a' and 'a' are incompatible.
|
||||
Type 'string' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
Signature '(): number' has no corresponding signature in 'String'
|
||||
Types of parameters 'a' and 'a' are incompatible.
|
||||
Type 'string' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
Signature '(): number' has no corresponding signature in 'String'
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping24.ts (1 errors) ====
|
||||
var foo:(a:{():number; (i:number):number; })=>number; foo = function(a:string){return 5};
|
||||
~~~
|
||||
!!! error TS2322: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number'.
|
||||
!!! error TS2322: Signature '(a: { (): number; (i: number): number; }): number' has no corresponding signature in '(a: string) => number'
|
||||
!!! error TS2322: Types of parameters 'a' and 'a' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in 'String'
|
||||
!!! error TS2322: Types of parameters 'a' and 'a' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type '{ (): number; (i: number): number; }'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in 'String'
|
||||
@@ -1,11 +1,9 @@
|
||||
tests/cases/compiler/contextualTyping39.ts(1,11): error TS2352: Neither type '() => string' nor type '() => number' is assignable to the other.
|
||||
Signature '(): number' has no corresponding signature in '() => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping39.ts (1 errors) ====
|
||||
var foo = <{ (): number; }> function() { return "err"; };
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2352: Neither type '() => string' nor type '() => number' is assignable to the other.
|
||||
!!! error TS2352: Signature '(): number' has no corresponding signature in '() => string'
|
||||
!!! error TS2352: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2352: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,11 +1,9 @@
|
||||
tests/cases/compiler/contextualTyping41.ts(1,11): error TS2352: Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other.
|
||||
Signature '(): number' has no corresponding signature in '() => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTyping41.ts (1 errors) ====
|
||||
var foo = <{():number; (i:number):number; }> (function(){return "err";});
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2352: Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other.
|
||||
!!! error TS2352: Signature '(): number' has no corresponding signature in '() => string'
|
||||
!!! error TS2352: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2352: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,9 +1,8 @@
|
||||
tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS2322: Type '((a: C) => number) | ((b: number) => void)' is not assignable to type '(a: A) => void'.
|
||||
Type '(b: number) => void' is not assignable to type '(a: A) => void'.
|
||||
Signature '(a: A): void' has no corresponding signature in '(b: number) => void'
|
||||
Types of parameters 'b' and 'a' are incompatible.
|
||||
Type 'number' is not assignable to type 'A'.
|
||||
Property 'foo' is missing in type 'Number'.
|
||||
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) ====
|
||||
@@ -21,8 +20,7 @@ tests/cases/compiler/contextualTypingOfConditionalExpression2.ts(11,5): error TS
|
||||
~~
|
||||
!!! error TS2322: Type '((a: C) => number) | ((b: number) => void)' is not assignable to type '(a: A) => void'.
|
||||
!!! error TS2322: Type '(b: number) => void' is not assignable to type '(a: A) => void'.
|
||||
!!! error TS2322: Signature '(a: A): void' has no corresponding signature in '(b: number) => 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'.
|
||||
!!! 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'.
|
||||
|
||||
+6
-10
@@ -1,10 +1,8 @@
|
||||
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'.
|
||||
Signature '(x: number): Date' has no corresponding signature in '(x: number) => string'
|
||||
Type 'string' is not assignable to type 'Date'.
|
||||
Property 'toDateString' is missing in type 'String'.
|
||||
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'.
|
||||
Signature '(x: number): Date' has no corresponding signature in '(x: number) => string'
|
||||
Type 'string' is not assignable to type 'Date'.
|
||||
Type 'string' is not assignable to type 'Date'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts (2 errors) ====
|
||||
@@ -26,12 +24,10 @@ tests/cases/compiler/contextualTypingOfGenericFunctionTypedArguments1.ts(17,32):
|
||||
var r5 = _.forEach<number>(c2, f);
|
||||
~
|
||||
!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'.
|
||||
!!! error TS2345: Signature '(x: number): Date' has no corresponding signature in '(x: number) => string'
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Property 'toDateString' is missing in type 'String'.
|
||||
!!! 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'.
|
||||
!!! error TS2345: Signature '(x: number): Date' has no corresponding signature in '(x: number) => string'
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Date'.
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity.ts(18,1): error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '(x?: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x?: string) => void'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity.ts (1 errors) ====
|
||||
@@ -29,8 +28,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type '(x?: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x?: string) => void'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
var r = c.foo(1);
|
||||
var r2 = e.foo('');
|
||||
@@ -1,9 +1,8 @@
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity2.ts(18,1): error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '(x: number, y?: string) => void' is not assignable to type '(x: number, y: number) => void'.
|
||||
Signature '(x: number, y: number): void' has no corresponding signature in '(x: number, y?: string) => void'
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity2.ts (1 errors) ====
|
||||
@@ -29,8 +28,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type '(x: number, y?: string) => void' is not assignable to type '(x: number, y: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number, y: number): void' has no corresponding signature in '(x: number, y?: string) => void'
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
var r = c.foo(1, 1);
|
||||
var r2 = e.foo(1, '');
|
||||
@@ -1,9 +1,8 @@
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts(18,1): error TS2322: Type 'E<string>' is not assignable to type 'C<string>'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '(x: string, y?: number) => void' is not assignable to type '(x: string, y: string) => void'.
|
||||
Signature '(x: string, y: string): void' has no corresponding signature in '(x: string, y?: number) => void'
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'y' and 'y' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity3.ts (1 errors) ====
|
||||
@@ -29,8 +28,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra
|
||||
!!! error TS2322: Type 'E<string>' is not assignable to type 'C<string>'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type '(x: string, y?: number) => void' is not assignable to type '(x: string, y: string) => void'.
|
||||
!!! error TS2322: Signature '(x: string, y: string): void' has no corresponding signature in '(x: string, y?: number) => void'
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
var r = c.foo('', '');
|
||||
var r2 = e.foo('', 1);
|
||||
@@ -1,9 +1,8 @@
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity4.ts(18,1): error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '(x?: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x?: string) => void'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTransitivity4.ts(19,9): error TS2445: Property 'foo' is protected and only accessible within class 'C' and its subclasses.
|
||||
|
||||
|
||||
@@ -30,9 +29,8 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassTra
|
||||
!!! error TS2322: Type 'E' is not assignable to type 'C'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type '(x?: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x?: string) => void'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
var r = c.foo(1);
|
||||
~~~~~
|
||||
!!! error TS2445: Property 'foo' is protected and only accessible within class 'C' and its subclasses.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/derivedInterfaceCallSignature.ts(11,11): error TS2430: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'.
|
||||
Signature '(): (data: any, index?: number) => number' has no corresponding signature in '(x: (data: any, index?: number) => number) => D3SvgArea'
|
||||
|
||||
|
||||
==== tests/cases/compiler/derivedInterfaceCallSignature.ts (1 errors) ====
|
||||
@@ -20,7 +19,6 @@ tests/cases/compiler/derivedInterfaceCallSignature.ts(11,11): error TS2430: Inte
|
||||
!!! error TS2430: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath'.
|
||||
!!! error TS2430: Types of property 'x' are incompatible.
|
||||
!!! error TS2430: Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'.
|
||||
!!! error TS2430: Signature '(): (data: any, index?: number) => number' has no corresponding signature in '(x: (data: any, index?: number) => number) => D3SvgArea'
|
||||
x(x: (data: any, index?: number) => number): D3SvgArea;
|
||||
y(y: (data: any, index?: number) => number): D3SvgArea;
|
||||
y0(): (data: any, index?: number) => number;
|
||||
|
||||
@@ -5,11 +5,10 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(8,4): error TS2345: Argument of type '[number, number, string[][], string]' is not assignable to parameter of type '[number, number, string[][]]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => number | string[][] | string' is not assignable to type '() => number | string[][]'.
|
||||
Signature '(): number | string[][]' has no corresponding signature in '() => number | string[][] | string'
|
||||
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'.
|
||||
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; }'.
|
||||
@@ -48,10 +47,9 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(55,7): error TS2420: Class 'C4' incorrectly implements interface 'F2'.
|
||||
Types of property 'd4' are incompatible.
|
||||
Type '({x, y, c}: { x: any; y: any; c: any; }) => void' is not assignable to type '({x, y, z}?: { x: any; y: any; z: any; }) => any'.
|
||||
Signature '({x, y, z}?: { x: any; y: any; z: any; }): any' has no corresponding signature in '({x, y, c}: { x: any; y: any; c: any; }) => void'
|
||||
Types of parameters '__0' and '__0' are incompatible.
|
||||
Type '{ x: any; y: any; c: any; }' is not assignable to type '{ x: any; y: any; z: any; }'.
|
||||
Property 'z' is missing in type '{ x: any; y: any; c: any; }'.
|
||||
Types of parameters '__0' and '__0' are incompatible.
|
||||
Type '{ x: any; y: any; c: any; }' is not assignable to type '{ x: any; y: any; z: any; }'.
|
||||
Property 'z' is missing in type '{ x: any; y: any; c: any; }'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(56,8): error TS2463: A binding pattern parameter cannot be optional in an implementation signature.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(65,18): error TS2300: Duplicate identifier 'number'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(65,26): error TS2300: Duplicate identifier 'number'.
|
||||
@@ -77,11 +75,10 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(
|
||||
!!! error TS2345: Argument of type '[number, number, string[][], string]' is not assignable to parameter of type '[number, number, string[][]]'.
|
||||
!!! error TS2345: Types of property 'pop' are incompatible.
|
||||
!!! error TS2345: Type '() => number | string[][] | string' is not assignable to type '() => number | string[][]'.
|
||||
!!! error TS2345: Signature '(): number | string[][]' has no corresponding signature in '() => number | string[][] | string'
|
||||
!!! 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'.
|
||||
!!! 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
|
||||
@@ -182,10 +179,9 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2.ts(
|
||||
!!! error TS2420: Class 'C4' incorrectly implements interface 'F2'.
|
||||
!!! error TS2420: Types of property 'd4' are incompatible.
|
||||
!!! error TS2420: Type '({x, y, c}: { x: any; y: any; c: any; }) => void' is not assignable to type '({x, y, z}?: { x: any; y: any; z: any; }) => any'.
|
||||
!!! error TS2420: Signature '({x, y, z}?: { x: any; y: any; z: any; }): any' has no corresponding signature in '({x, y, c}: { x: any; y: any; c: any; }) => void'
|
||||
!!! error TS2420: Types of parameters '__0' and '__0' are incompatible.
|
||||
!!! error TS2420: Type '{ x: any; y: any; c: any; }' is not assignable to type '{ x: any; y: any; z: any; }'.
|
||||
!!! error TS2420: Property 'z' is missing in type '{ x: any; y: any; c: any; }'.
|
||||
!!! error TS2420: Types of parameters '__0' and '__0' are incompatible.
|
||||
!!! error TS2420: Type '{ x: any; y: any; c: any; }' is not assignable to type '{ x: any; y: any; z: any; }'.
|
||||
!!! error TS2420: Property 'z' is missing in type '{ x: any; y: any; c: any; }'.
|
||||
d3([a, b, c]?) { } // Error, binding pattern can't be optional in implementation signature
|
||||
~~~~~~~~~~
|
||||
!!! error TS2463: A binding pattern parameter cannot be optional in an implementation signature.
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
tests/cases/compiler/errorElaboration.ts(12,5): error TS2345: Argument of type '() => Container<Ref<string>>' is not assignable to parameter of type '() => Container<Ref<number>>'.
|
||||
Signature '(): Container<Ref<number>>' has no corresponding signature in '() => Container<Ref<string>>'
|
||||
Type 'Container<Ref<string>>' is not assignable to type 'Container<Ref<number>>'.
|
||||
Type 'Ref<string>' is not assignable to type 'Ref<number>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'Container<Ref<string>>' is not assignable to type 'Container<Ref<number>>'.
|
||||
Type 'Ref<string>' is not assignable to type 'Ref<number>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/errorElaboration.ts (1 errors) ====
|
||||
@@ -20,8 +19,7 @@ tests/cases/compiler/errorElaboration.ts(12,5): error TS2345: Argument of type '
|
||||
foo(a);
|
||||
~
|
||||
!!! error TS2345: Argument of type '() => Container<Ref<string>>' is not assignable to parameter of type '() => Container<Ref<number>>'.
|
||||
!!! error TS2345: Signature '(): Container<Ref<number>>' has no corresponding signature in '() => Container<Ref<string>>'
|
||||
!!! error TS2345: Type 'Container<Ref<string>>' is not assignable to type 'Container<Ref<number>>'.
|
||||
!!! error TS2345: Type 'Ref<string>' is not assignable to type 'Ref<number>'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2345: Type 'Container<Ref<string>>' is not assignable to type 'Container<Ref<number>>'.
|
||||
!!! error TS2345: Type 'Ref<string>' is not assignable to type 'Ref<number>'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/compiler/errorOnContextuallyTypedReturnType.ts(1,5): error TS2322: Type '() => void' is not assignable to type '() => boolean'.
|
||||
Signature '(): boolean' has no corresponding signature in '() => void'
|
||||
Type 'void' is not assignable to type 'boolean'.
|
||||
Type 'void' is not assignable to type 'boolean'.
|
||||
tests/cases/compiler/errorOnContextuallyTypedReturnType.ts(2,37): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.
|
||||
|
||||
|
||||
@@ -8,8 +7,7 @@ tests/cases/compiler/errorOnContextuallyTypedReturnType.ts(2,37): error TS2355:
|
||||
var n1: () => boolean = function () { }; // expect an error here
|
||||
~~
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '() => boolean'.
|
||||
!!! error TS2322: Signature '(): boolean' has no corresponding signature in '() => void'
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'boolean'.
|
||||
var n2: () => boolean = function ():boolean { }; // expect an error here
|
||||
~~~~~~~
|
||||
!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.
|
||||
|
||||
@@ -16,26 +16,21 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd
|
||||
Types of property 'id' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(46,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'.
|
||||
Signature '(x: string): number' has no corresponding signature in '(x: number) => boolean'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(47,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'.
|
||||
Signature '(x: string): number' has no corresponding signature in '(x: number) => boolean'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(48,5): error TS2322: Type '(x: string) => string' is not assignable to type '(x: string) => number'.
|
||||
Signature '(x: string): number' has no corresponding signature in '(x: string) => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(50,5): error TS2322: Type 'typeof N' is not assignable to type 'typeof M'.
|
||||
Types of property 'A' are incompatible.
|
||||
Type 'typeof N.A' is not assignable to type 'typeof M.A'.
|
||||
Signature 'new (): A' has no corresponding signature in 'typeof A'
|
||||
Type 'N.A' is not assignable to type 'M.A'.
|
||||
Property 'name' is missing in type 'A'.
|
||||
Type 'N.A' is not assignable to type 'M.A'.
|
||||
Property 'name' is missing in type 'A'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(51,5): error TS2322: Type 'N.A' is not assignable to type 'M.A'.
|
||||
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(52,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'.
|
||||
Signature '(x: number): string' has no corresponding signature in '(x: number) => boolean'
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts (15 errors) ====
|
||||
@@ -113,36 +108,31 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd
|
||||
var aFunction: typeof F = F2;
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'.
|
||||
!!! error TS2322: Signature '(x: string): number' has no corresponding signature in '(x: number) => boolean'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
var anOtherFunction: (x: string) => number = F2;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number'.
|
||||
!!! error TS2322: Signature '(x: string): number' has no corresponding signature in '(x: number) => boolean'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
var aLambda: typeof F = (x) => 'a string';
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: string) => number'.
|
||||
!!! error TS2322: Signature '(x: string): number' has no corresponding signature in '(x: string) => string'
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
var aModule: typeof M = N;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type 'typeof N' is not assignable to type 'typeof M'.
|
||||
!!! error TS2322: Types of property 'A' are incompatible.
|
||||
!!! error TS2322: Type 'typeof N.A' is not assignable to type 'typeof M.A'.
|
||||
!!! error TS2322: Signature 'new (): A' has no corresponding signature in 'typeof A'
|
||||
!!! error TS2322: Type 'N.A' is not assignable to type 'M.A'.
|
||||
!!! error TS2322: Property 'name' is missing in type 'A'.
|
||||
!!! error TS2322: Type 'N.A' is not assignable to type 'M.A'.
|
||||
!!! error TS2322: Property 'name' is missing in type 'A'.
|
||||
var aClassInModule: M.A = new N.A();
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'N.A' is not assignable to type 'M.A'.
|
||||
var aFunctionInModule: typeof M.F2 = F2;
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'.
|
||||
!!! error TS2322: Signature '(x: number): string' has no corresponding signature in '(x: number) => boolean'
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(7,7): error TS2420: Class 'D' incorrectly implements interface 'C<number>'.
|
||||
Types of property 'bar' are incompatible.
|
||||
Type '() => string' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '() => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(12,5): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(16,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -19,8 +18,7 @@ tests/cases/compiler/extendAndImplementTheSameBaseType2.ts(16,5): error TS2322:
|
||||
!!! error TS2420: Class 'D' incorrectly implements interface 'C<number>'.
|
||||
!!! error TS2420: Types of property 'bar' are incompatible.
|
||||
!!! error TS2420: Type '() => string' is not assignable to type '() => number'.
|
||||
!!! error TS2420: Signature '(): number' has no corresponding signature in '() => string'
|
||||
!!! error TS2420: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2420: Type 'string' is not assignable to type 'number'.
|
||||
baz() { }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
tests/cases/compiler/fixingTypeParametersRepeatedly2.ts(11,27): error TS2345: Argument of type '(d: Derived) => Base' is not assignable to parameter of type '(p: Derived) => Derived'.
|
||||
Signature '(p: Derived): Derived' has no corresponding signature in '(d: Derived) => Base'
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'toBase' is missing in type 'Base'.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'toBase' is missing in type 'Base'.
|
||||
tests/cases/compiler/fixingTypeParametersRepeatedly2.ts(17,27): error TS2345: Argument of type '(d: Derived) => Base' is not assignable to parameter of type '(p: Derived) => Derived'.
|
||||
Signature '(p: Derived): Derived' has no corresponding signature in '(d: Derived) => Base'
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/fixingTypeParametersRepeatedly2.ts (2 errors) ====
|
||||
@@ -21,9 +19,8 @@ tests/cases/compiler/fixingTypeParametersRepeatedly2.ts(17,27): error TS2345: Ar
|
||||
var result = foo(derived, d => d.toBase());
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(d: Derived) => Base' is not assignable to parameter of type '(p: Derived) => Derived'.
|
||||
!!! error TS2345: Signature '(p: Derived): Derived' has no corresponding signature in '(d: Derived) => Base'
|
||||
!!! error TS2345: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2345: Property 'toBase' is missing in type 'Base'.
|
||||
!!! error TS2345: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2345: Property 'toBase' is missing in type 'Base'.
|
||||
|
||||
// bar should type check just like foo.
|
||||
// The same error should be observed in both cases.
|
||||
@@ -32,5 +29,4 @@ tests/cases/compiler/fixingTypeParametersRepeatedly2.ts(17,27): error TS2345: Ar
|
||||
var result = bar(derived, d => d.toBase());
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(d: Derived) => Base' is not assignable to parameter of type '(p: Derived) => Derived'.
|
||||
!!! error TS2345: Signature '(p: Derived): Derived' has no corresponding signature in '(d: Derived) => Base'
|
||||
!!! error TS2345: Type 'Base' is not assignable to type 'Derived'.
|
||||
!!! error TS2345: Type 'Base' is not assignable to type 'Derived'.
|
||||
@@ -1,11 +1,10 @@
|
||||
tests/cases/conformance/es6/for-ofStatements/for-of30.ts(1,15): error TS2322: Type 'StringIterator' is not assignable to type 'Iterable<string>'.
|
||||
Types of property '[Symbol.iterator]' are incompatible.
|
||||
Type '() => StringIterator' is not assignable to type '() => Iterator<string>'.
|
||||
Signature '(): Iterator<string>' has no corresponding signature in '() => StringIterator'
|
||||
Type 'StringIterator' is not assignable to type 'Iterator<string>'.
|
||||
Types of property 'return' are incompatible.
|
||||
Type 'number' is not assignable to type '(value?: any) => IteratorResult<string>'.
|
||||
Signature '(value?: any): IteratorResult<string>' has no corresponding signature in 'Number'
|
||||
Type 'StringIterator' is not assignable to type 'Iterator<string>'.
|
||||
Types of property 'return' are incompatible.
|
||||
Type 'number' is not assignable to type '(value?: any) => IteratorResult<string>'.
|
||||
Signature '(value?: any): IteratorResult<string>' has no corresponding signature in 'Number'
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/for-ofStatements/for-of30.ts (1 errors) ====
|
||||
@@ -14,11 +13,10 @@ tests/cases/conformance/es6/for-ofStatements/for-of30.ts(1,15): error TS2322: Ty
|
||||
!!! error TS2322: Type 'StringIterator' is not assignable to type 'Iterable<string>'.
|
||||
!!! error TS2322: Types of property '[Symbol.iterator]' are incompatible.
|
||||
!!! error TS2322: Type '() => StringIterator' is not assignable to type '() => Iterator<string>'.
|
||||
!!! error TS2322: Signature '(): Iterator<string>' has no corresponding signature in '() => StringIterator'
|
||||
!!! error TS2322: Type 'StringIterator' is not assignable to type 'Iterator<string>'.
|
||||
!!! error TS2322: Types of property 'return' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type '(value?: any) => IteratorResult<string>'.
|
||||
!!! error TS2322: Signature '(value?: any): IteratorResult<string>' has no corresponding signature in 'Number'
|
||||
!!! error TS2322: Type 'StringIterator' is not assignable to type 'Iterator<string>'.
|
||||
!!! error TS2322: Types of property 'return' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type '(value?: any) => IteratorResult<string>'.
|
||||
!!! error TS2322: Signature '(value?: any): IteratorResult<string>' has no corresponding signature in 'Number'
|
||||
|
||||
class StringIterator {
|
||||
next() {
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
tests/cases/conformance/es6/for-ofStatements/for-of31.ts(1,15): error TS2322: Type 'StringIterator' is not assignable to type 'Iterable<string>'.
|
||||
Types of property '[Symbol.iterator]' are incompatible.
|
||||
Type '() => StringIterator' is not assignable to type '() => Iterator<string>'.
|
||||
Signature '(): Iterator<string>' has no corresponding signature in '() => StringIterator'
|
||||
Type 'StringIterator' is not assignable to type 'Iterator<string>'.
|
||||
Types of property 'next' are incompatible.
|
||||
Type '() => { value: string; }' is not assignable to type '(value?: any) => IteratorResult<string>'.
|
||||
Signature '(value?: any): IteratorResult<string>' has no corresponding signature in '() => { value: string; }'
|
||||
Type '{ value: string; }' is not assignable to type 'IteratorResult<string>'.
|
||||
Property 'done' is missing in type '{ value: string; }'.
|
||||
Type 'StringIterator' is not assignable to type 'Iterator<string>'.
|
||||
Types of property 'next' are incompatible.
|
||||
Type '() => { value: string; }' is not assignable to type '(value?: any) => IteratorResult<string>'.
|
||||
Type '{ value: string; }' is not assignable to type 'IteratorResult<string>'.
|
||||
Property 'done' is missing in type '{ value: string; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/for-ofStatements/for-of31.ts (1 errors) ====
|
||||
@@ -16,13 +14,11 @@ tests/cases/conformance/es6/for-ofStatements/for-of31.ts(1,15): error TS2322: Ty
|
||||
!!! error TS2322: Type 'StringIterator' is not assignable to type 'Iterable<string>'.
|
||||
!!! error TS2322: Types of property '[Symbol.iterator]' are incompatible.
|
||||
!!! error TS2322: Type '() => StringIterator' is not assignable to type '() => Iterator<string>'.
|
||||
!!! error TS2322: Signature '(): Iterator<string>' has no corresponding signature in '() => StringIterator'
|
||||
!!! error TS2322: Type 'StringIterator' is not assignable to type 'Iterator<string>'.
|
||||
!!! error TS2322: Types of property 'next' are incompatible.
|
||||
!!! error TS2322: Type '() => { value: string; }' is not assignable to type '(value?: any) => IteratorResult<string>'.
|
||||
!!! error TS2322: Signature '(value?: any): IteratorResult<string>' has no corresponding signature in '() => { value: string; }'
|
||||
!!! error TS2322: Type '{ value: string; }' is not assignable to type 'IteratorResult<string>'.
|
||||
!!! error TS2322: Property 'done' is missing in type '{ value: string; }'.
|
||||
!!! error TS2322: Type 'StringIterator' is not assignable to type 'Iterator<string>'.
|
||||
!!! error TS2322: Types of property 'next' are incompatible.
|
||||
!!! error TS2322: Type '() => { value: string; }' is not assignable to type '(value?: any) => IteratorResult<string>'.
|
||||
!!! error TS2322: Type '{ value: string; }' is not assignable to type 'IteratorResult<string>'.
|
||||
!!! error TS2322: Property 'done' is missing in type '{ value: string; }'.
|
||||
|
||||
class StringIterator {
|
||||
next() {
|
||||
|
||||
@@ -5,15 +5,13 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain
|
||||
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'.
|
||||
Signature '(x: string): string' has no corresponding signature in 'Function'
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(24,15): error TS2345: Argument of type '(x: string[]) => string[]' is not assignable to parameter of type '(x: string) => string'.
|
||||
Signature '(x: string): string' has no corresponding signature in '(x: string[]) => string[]'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string[]' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string[]' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(25,15): error TS2345: Argument of type 'typeof C' is not assignable to parameter of type '(x: string) => string'.
|
||||
Signature '(x: string): string' has no corresponding signature in 'typeof C'
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(26,15): error TS2345: Argument of type 'new (x: string) => string' is not assignable to parameter of type '(x: string) => string'.
|
||||
Signature '(x: string): string' has no corresponding signature in 'new (x: string) => string'
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(28,16): error TS2345: Argument of type '<U, V>(x: U, y: V) => U' is not assignable to parameter of type '(x: string) => string'.
|
||||
Signature '(x: string): string' has no corresponding signature in '<U, V>(x: U, y: V) => U'
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(29,16): error TS2345: Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'.
|
||||
Signature '(x: string): string' has no corresponding signature in 'typeof C2'
|
||||
tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(30,16): error TS2345: Argument of type 'new <T>(x: T) => T' is not assignable to parameter of type '(x: string) => string'.
|
||||
@@ -63,9 +61,8 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain
|
||||
var r2 = foo2((x: string[]) => x);
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: string[]) => string[]' is not assignable to parameter of type '(x: string) => string'.
|
||||
!!! error TS2345: Signature '(x: string): string' has no corresponding signature in '(x: string[]) => string[]'
|
||||
!!! error TS2345: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2345: Type 'string[]' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2345: Type 'string[]' is not assignable to type 'string'.
|
||||
var r6 = foo2(C);
|
||||
~
|
||||
!!! error TS2345: Argument of type 'typeof C' is not assignable to parameter of type '(x: string) => string'.
|
||||
@@ -78,7 +75,6 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain
|
||||
var r11 = foo2(<U, V>(x: U, y: V) => x);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<U, V>(x: U, y: V) => U' is not assignable to parameter of type '(x: string) => string'.
|
||||
!!! error TS2345: Signature '(x: string): string' has no corresponding signature in '<U, V>(x: U, y: V) => U'
|
||||
var r13 = foo2(C2);
|
||||
~~
|
||||
!!! error TS2345: Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/conformance/expressions/contextualTyping/functionExpressionContextualTyping2.ts(11,1): error TS2322: Type '(foo: number, bar: string) => boolean' is not assignable to type '((n: number, s: string) => number) | ((n: number, s: string) => string)'.
|
||||
Type '(foo: number, bar: string) => boolean' is not assignable to type '(n: number, s: string) => string'.
|
||||
Signature '(n: number, s: string): string' has no corresponding signature in '(foo: number, bar: string) => boolean'
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/contextualTyping/functionExpressionContextualTyping2.ts (1 errors) ====
|
||||
@@ -19,5 +18,4 @@ tests/cases/conformance/expressions/contextualTyping/functionExpressionContextua
|
||||
~~
|
||||
!!! error TS2322: Type '(foo: number, bar: string) => boolean' is not assignable to type '((n: number, s: string) => number) | ((n: number, s: string) => string)'.
|
||||
!!! error TS2322: Type '(foo: number, bar: string) => boolean' is not assignable to type '(n: number, s: string) => string'.
|
||||
!!! error TS2322: Signature '(n: number, s: string): string' has no corresponding signature in '(foo: number, bar: string) => boolean'
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/functionSignatureAssignmentCompat1.ts(10,5): error TS2322: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc'.
|
||||
Signature '(eventEmitter: number, buffer: string): void' has no corresponding signature in '(delimiter?: string) => ParserFunc'
|
||||
Types of parameters 'delimiter' and 'eventEmitter' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'delimiter' and 'eventEmitter' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/functionSignatureAssignmentCompat1.ts (1 errors) ====
|
||||
@@ -17,7 +16,6 @@ tests/cases/compiler/functionSignatureAssignmentCompat1.ts(10,5): error TS2322:
|
||||
var d: ParserFunc = parsers.readline; // not ok
|
||||
~
|
||||
!!! error TS2322: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc'.
|
||||
!!! error TS2322: Signature '(eventEmitter: number, buffer: string): void' has no corresponding signature in '(delimiter?: string) => ParserFunc'
|
||||
!!! error TS2322: Types of parameters 'delimiter' and 'eventEmitter' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'delimiter' and 'eventEmitter' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
var e: ParserFunc = parsers.readline(); // ok
|
||||
@@ -1,17 +1,14 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts(4,5): error TS2322: Type '() => IterableIterator<Bar | Baz>' is not assignable to type '() => Iterable<Foo>'.
|
||||
Signature '(): Iterable<Foo>' has no corresponding signature in '() => IterableIterator<Bar | Baz>'
|
||||
Type 'IterableIterator<Bar | Baz>' is not assignable to type 'Iterable<Foo>'.
|
||||
Types of property '[Symbol.iterator]' are incompatible.
|
||||
Type '() => IterableIterator<Bar | Baz>' is not assignable to type '() => Iterator<Foo>'.
|
||||
Signature '(): Iterator<Foo>' has no corresponding signature in '() => IterableIterator<Bar | Baz>'
|
||||
Type 'IterableIterator<Bar | Baz>' is not assignable to type 'Iterator<Foo>'.
|
||||
Types of property 'next' are incompatible.
|
||||
Type '(value?: any) => IteratorResult<Bar | Baz>' is not assignable to type '(value?: any) => IteratorResult<Foo>'.
|
||||
Signature '(value?: any): IteratorResult<Foo>' has no corresponding signature in '(value?: any) => IteratorResult<Bar | Baz>'
|
||||
Type 'IteratorResult<Bar | Baz>' is not assignable to type 'IteratorResult<Foo>'.
|
||||
Type 'Bar | Baz' is not assignable to type 'Foo'.
|
||||
Type 'Baz' is not assignable to type 'Foo'.
|
||||
Property 'x' is missing in type 'Baz'.
|
||||
Type 'IterableIterator<Bar | Baz>' is not assignable to type 'Iterable<Foo>'.
|
||||
Types of property '[Symbol.iterator]' are incompatible.
|
||||
Type '() => IterableIterator<Bar | Baz>' is not assignable to type '() => Iterator<Foo>'.
|
||||
Type 'IterableIterator<Bar | Baz>' is not assignable to type 'Iterator<Foo>'.
|
||||
Types of property 'next' are incompatible.
|
||||
Type '(value?: any) => IteratorResult<Bar | Baz>' is not assignable to type '(value?: any) => IteratorResult<Foo>'.
|
||||
Type 'IteratorResult<Bar | Baz>' is not assignable to type 'IteratorResult<Foo>'.
|
||||
Type 'Bar | Baz' is not assignable to type 'Foo'.
|
||||
Type 'Baz' is not assignable to type 'Foo'.
|
||||
Property 'x' is missing in type 'Baz'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts (1 errors) ====
|
||||
@@ -21,19 +18,16 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts(4,5): error
|
||||
var g3: () => Iterable<Foo> = function* () {
|
||||
~~
|
||||
!!! error TS2322: Type '() => IterableIterator<Bar | Baz>' is not assignable to type '() => Iterable<Foo>'.
|
||||
!!! error TS2322: Signature '(): Iterable<Foo>' has no corresponding signature in '() => IterableIterator<Bar | Baz>'
|
||||
!!! error TS2322: Type 'IterableIterator<Bar | Baz>' is not assignable to type 'Iterable<Foo>'.
|
||||
!!! error TS2322: Types of property '[Symbol.iterator]' are incompatible.
|
||||
!!! error TS2322: Type '() => IterableIterator<Bar | Baz>' is not assignable to type '() => Iterator<Foo>'.
|
||||
!!! error TS2322: Signature '(): Iterator<Foo>' has no corresponding signature in '() => IterableIterator<Bar | Baz>'
|
||||
!!! error TS2322: Type 'IterableIterator<Bar | Baz>' is not assignable to type 'Iterator<Foo>'.
|
||||
!!! error TS2322: Types of property 'next' are incompatible.
|
||||
!!! error TS2322: Type '(value?: any) => IteratorResult<Bar | Baz>' is not assignable to type '(value?: any) => IteratorResult<Foo>'.
|
||||
!!! error TS2322: Signature '(value?: any): IteratorResult<Foo>' has no corresponding signature in '(value?: any) => IteratorResult<Bar | Baz>'
|
||||
!!! error TS2322: Type 'IteratorResult<Bar | Baz>' is not assignable to type 'IteratorResult<Foo>'.
|
||||
!!! error TS2322: Type 'Bar | Baz' is not assignable to type 'Foo'.
|
||||
!!! error TS2322: Type 'Baz' is not assignable to type 'Foo'.
|
||||
!!! error TS2322: Property 'x' is missing in type 'Baz'.
|
||||
!!! error TS2322: Type 'IterableIterator<Bar | Baz>' is not assignable to type 'Iterable<Foo>'.
|
||||
!!! error TS2322: Types of property '[Symbol.iterator]' are incompatible.
|
||||
!!! error TS2322: Type '() => IterableIterator<Bar | Baz>' is not assignable to type '() => Iterator<Foo>'.
|
||||
!!! error TS2322: Type 'IterableIterator<Bar | Baz>' is not assignable to type 'Iterator<Foo>'.
|
||||
!!! error TS2322: Types of property 'next' are incompatible.
|
||||
!!! error TS2322: Type '(value?: any) => IteratorResult<Bar | Baz>' is not assignable to type '(value?: any) => IteratorResult<Foo>'.
|
||||
!!! error TS2322: Type 'IteratorResult<Bar | Baz>' is not assignable to type 'IteratorResult<Foo>'.
|
||||
!!! error TS2322: Type 'Bar | Baz' is not assignable to type 'Foo'.
|
||||
!!! error TS2322: Type 'Baz' is not assignable to type 'Foo'.
|
||||
!!! error TS2322: Property 'x' is missing in type 'Baz'.
|
||||
yield;
|
||||
yield new Bar;
|
||||
yield new Baz;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck8.ts(2,17): error TS2322: Type 'IterableIterator<string>' is not assignable to type 'BadGenerator'.
|
||||
Types of property 'next' are incompatible.
|
||||
Type '(value?: any) => IteratorResult<string>' is not assignable to type '(value?: any) => IteratorResult<number>'.
|
||||
Signature '(value?: any): IteratorResult<number>' has no corresponding signature in '(value?: any) => IteratorResult<string>'
|
||||
Type 'IteratorResult<string>' is not assignable to type 'IteratorResult<number>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'IteratorResult<string>' is not assignable to type 'IteratorResult<number>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck8.ts (1 errors) ====
|
||||
@@ -13,6 +12,5 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck8.ts(2,17): error
|
||||
!!! error TS2322: Type 'IterableIterator<string>' is not assignable to type 'BadGenerator'.
|
||||
!!! error TS2322: Types of property 'next' are incompatible.
|
||||
!!! error TS2322: Type '(value?: any) => IteratorResult<string>' is not assignable to type '(value?: any) => IteratorResult<number>'.
|
||||
!!! error TS2322: Signature '(value?: any): IteratorResult<number>' has no corresponding signature in '(value?: any) => IteratorResult<string>'
|
||||
!!! error TS2322: Type 'IteratorResult<string>' is not assignable to type 'IteratorResult<number>'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'IteratorResult<string>' is not assignable to type 'IteratorResult<number>'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
@@ -3,9 +3,8 @@ tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(12,5): error TS23
|
||||
Type 'A<number>' is not assignable to type 'Comparable<string>'.
|
||||
Types of property 'compareTo' are incompatible.
|
||||
Type '(other: number) => number' is not assignable to type '(other: string) => number'.
|
||||
Signature '(other: string): number' has no corresponding signature in '(other: number) => number'
|
||||
Types of parameters 'other' and 'other' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'other' and 'other' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(13,5): error TS2322: Type '{ x: A<number>; }' is not assignable to type 'I<string>'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'A<number>' is not assignable to type 'Comparable<string>'.
|
||||
@@ -36,9 +35,8 @@ tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts(17,5): error TS23
|
||||
!!! error TS2322: Type 'A<number>' is not assignable to type 'Comparable<string>'.
|
||||
!!! error TS2322: Types of property 'compareTo' are incompatible.
|
||||
!!! error TS2322: Type '(other: number) => number' is not assignable to type '(other: string) => number'.
|
||||
!!! error TS2322: Signature '(other: string): number' has no corresponding signature in '(other: number) => number'
|
||||
!!! error TS2322: Types of parameters 'other' and 'other' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'other' and 'other' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
var a2: I<string> = function (): { x: A<number> } {
|
||||
~~
|
||||
!!! error TS2322: Type '{ x: A<number>; }' is not assignable to type 'I<string>'.
|
||||
|
||||
+16
-24
@@ -1,19 +1,15 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(24,38): error TS2345: Argument of type '{ (n: number): Promise<number>; (s: string): Promise<string>; }' is not assignable to parameter of type '(x: number) => Promise<string>'.
|
||||
Signature '(x: number): Promise<string>' has no corresponding signature in '{ (n: number): Promise<number>; (s: string): Promise<string>; }'
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(53,38): error TS2345: Argument of type '{ (n: number): Promise<number>; (s: string): Promise<string>; }' is not assignable to parameter of type '(x: number) => Promise<string>'.
|
||||
Signature '(x: number): Promise<string>' has no corresponding signature in '{ (n: number): Promise<number>; (s: string): Promise<string>; }'
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(69,38): error TS2345: Argument of type '{ (n: number): Promise<number>; (s: string): Promise<string>; }' is not assignable to parameter of type '(x: number) => Promise<string>'.
|
||||
Signature '(x: number): Promise<string>' has no corresponding signature in '{ (n: number): Promise<number>; (s: string): Promise<string>; }'
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(85,38): error TS2345: Argument of type '{ (n: number): Promise<number>; (s: string): Promise<string>; (b: boolean): Promise<boolean>; }' is not assignable to parameter of type '(x: number) => Promise<boolean>'.
|
||||
Signature '(x: number): Promise<boolean>' has no corresponding signature in '{ (n: number): Promise<number>; (s: string): Promise<string>; (b: boolean): Promise<boolean>; }'
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<boolean>'.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<boolean>'.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts (4 errors) ====
|
||||
@@ -43,9 +39,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl
|
||||
var newPromise = numPromise.then(testFunction);
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (n: number): Promise<number>; (s: string): Promise<string>; }' is not assignable to parameter of type '(x: number) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(x: number): Promise<string>' has no corresponding signature in '{ (n: number): Promise<number>; (s: string): Promise<string>; }'
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
@@ -77,9 +72,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl
|
||||
var newPromise = numPromise.then(testFunction);
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (n: number): Promise<number>; (s: string): Promise<string>; }' is not assignable to parameter of type '(x: number) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(x: number): Promise<string>' has no corresponding signature in '{ (n: number): Promise<number>; (s: string): Promise<string>; }'
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
@@ -98,9 +92,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl
|
||||
var newPromise = numPromise.then(testFunction);
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (n: number): Promise<number>; (s: string): Promise<string>; }' is not assignable to parameter of type '(x: number) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(x: number): Promise<string>' has no corresponding signature in '{ (n: number): Promise<number>; (s: string): Promise<string>; }'
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
@@ -119,8 +112,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl
|
||||
var newPromise = numPromise.then(testFunction);
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (n: number): Promise<number>; (s: string): Promise<string>; (b: boolean): Promise<boolean>; }' is not assignable to parameter of type '(x: number) => Promise<boolean>'.
|
||||
!!! error TS2345: Signature '(x: number): Promise<boolean>' has no corresponding signature in '{ (n: number): Promise<number>; (s: string): Promise<string>; (b: boolean): Promise<boolean>; }'
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<boolean>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<boolean>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'boolean'.
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts(11,14): error TS2345: Argument of type '{ cb: new <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: any) => string; }'.
|
||||
Types of property 'cb' are incompatible.
|
||||
Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: any) => string'.
|
||||
Signature 'new (t: any): string' has no corresponding signature in 'new <T>(x: T, y: T) => string'
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts(13,14): error TS2345: Argument of type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: new (t: string) => string; }'.
|
||||
Types of property 'cb' are incompatible.
|
||||
Type 'new (x: string, y: number) => string' is not assignable to type 'new (t: string) => string'.
|
||||
Signature 'new (t: string): string' has no corresponding signature in 'new (x: string, y: number) => string'
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts (2 errors) ====
|
||||
@@ -24,14 +22,12 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithCon
|
||||
!!! error TS2345: Argument of type '{ cb: new <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: any) => string; }'.
|
||||
!!! error TS2345: Types of property 'cb' are incompatible.
|
||||
!!! error TS2345: Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: any) => string'.
|
||||
!!! error TS2345: Signature 'new (t: any): string' has no corresponding signature in 'new <T>(x: T, y: T) => string'
|
||||
var arg3: { cb: new (x: string, y: number) => string };
|
||||
var r3 = foo(arg3); // error
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: new (t: string) => string; }'.
|
||||
!!! error TS2345: Types of property 'cb' are incompatible.
|
||||
!!! error TS2345: Type 'new (x: string, y: number) => string' is not assignable to type 'new (t: string) => string'.
|
||||
!!! error TS2345: Signature 'new (t: string): string' has no corresponding signature in 'new (x: string, y: number) => string'
|
||||
|
||||
function foo2<T, U>(arg: { cb: new(t: T, t2: T) => U }) {
|
||||
return new arg.cb(null, null);
|
||||
|
||||
@@ -3,21 +3,18 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(15,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(16,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(25,23): error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'.
|
||||
Signature '(x: Date): Date' has no corresponding signature in '(a: T) => T'
|
||||
Types of parameters 'a' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'Date'.
|
||||
Type 'RegExp' is not assignable to type 'Date'.
|
||||
Property 'toDateString' is missing in type 'RegExp'.
|
||||
Types of parameters 'a' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'Date'.
|
||||
Type 'RegExp' is not assignable to type 'Date'.
|
||||
Property 'toDateString' is missing in type 'RegExp'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(37,36): error TS2345: Argument of type '(x: E) => F' is not assignable to parameter of type '(x: E) => E'.
|
||||
Signature '(x: E): E' has no corresponding signature in '(x: E) => F'
|
||||
Type 'F' is not assignable to type 'E'.
|
||||
Type 'F' is not assignable to type 'E'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(50,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(51,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(60,23): error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'.
|
||||
Signature '(x: Date): Date' has no corresponding signature in '(a: T) => T'
|
||||
Types of parameters 'a' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'Date'.
|
||||
Type 'RegExp' is not assignable to type 'Date'.
|
||||
Types of parameters 'a' and 'x' are incompatible.
|
||||
Type 'T' is not assignable to type 'Date'.
|
||||
Type 'RegExp' is not assignable to type 'Date'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(67,51): error TS2304: Cannot find name 'U'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(67,57): error TS2304: Cannot find name 'U'.
|
||||
|
||||
@@ -57,11 +54,10 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
|
||||
var r7 = foo2((a: T) => a, (b: T) => b); // error
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'.
|
||||
!!! error TS2345: Signature '(x: Date): Date' has no corresponding signature in '(a: T) => T'
|
||||
!!! error TS2345: Types of parameters 'a' and 'x' are incompatible.
|
||||
!!! error TS2345: Type 'T' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Type 'RegExp' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Property 'toDateString' is missing in type 'RegExp'.
|
||||
!!! error TS2345: Types of parameters 'a' and 'x' are incompatible.
|
||||
!!! error TS2345: Type 'T' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Type 'RegExp' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Property 'toDateString' is missing in type 'RegExp'.
|
||||
var r7b = foo2((a) => a, (b) => b); // valid, T is inferred to be Date
|
||||
}
|
||||
|
||||
@@ -76,8 +72,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
|
||||
var r7 = foo3(E.A, (x) => E.A, (x) => F.A); // error
|
||||
~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: E) => F' is not assignable to parameter of type '(x: E) => E'.
|
||||
!!! error TS2345: Signature '(x: E): E' has no corresponding signature in '(x: E) => F'
|
||||
!!! error TS2345: Type 'F' is not assignable to type 'E'.
|
||||
!!! error TS2345: Type 'F' is not assignable to type 'E'.
|
||||
}
|
||||
|
||||
module TU {
|
||||
@@ -107,10 +102,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
|
||||
var r7 = foo2((a: T) => a, (b: T) => b);
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'.
|
||||
!!! error TS2345: Signature '(x: Date): Date' has no corresponding signature in '(a: T) => T'
|
||||
!!! error TS2345: Types of parameters 'a' and 'x' are incompatible.
|
||||
!!! error TS2345: Type 'T' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Type 'RegExp' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Types of parameters 'a' and 'x' are incompatible.
|
||||
!!! error TS2345: Type 'T' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Type 'RegExp' is not assignable to type 'Date'.
|
||||
var r7b = foo2((a) => a, (b) => b);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments3.ts(32,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate '(y: string) => string' is not a valid type argument because it is not a supertype of candidate '(a: string) => boolean'.
|
||||
Signature '(y: string): string' has no corresponding signature in '(a: string) => boolean'
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments3.ts(33,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate '(n: Object) => number' is not a valid type argument because it is not a supertype of candidate 'number'.
|
||||
Signature '(n: Object): number' has no corresponding signature in 'Number'
|
||||
@@ -43,8 +42,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
|
||||
~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS2453: Type argument candidate '(y: string) => string' is not a valid type argument because it is not a supertype of candidate '(a: string) => boolean'.
|
||||
!!! error TS2453: Signature '(y: string): string' has no corresponding signature in '(a: string) => boolean'
|
||||
!!! error TS2453: Type 'boolean' is not assignable to type 'string'.
|
||||
!!! error TS2453: Type 'boolean' is not assignable to type 'string'.
|
||||
var r12 = foo2(x, (a1: (y: string) => boolean) => (n: Object) => 1, (a2: (z: string) => boolean) => 2); // error
|
||||
~~~~
|
||||
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
|
||||
-2
@@ -1,5 +1,4 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts(31,20): error TS2345: Argument of type 'new <T>(x: T, y: T) => string' is not assignable to parameter of type '{ new (x: any): string; new (x: any, y?: any): string; }'.
|
||||
Signature 'new (x: any): string' has no corresponding signature in 'new <T>(x: T, y: T) => string'
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts (1 errors) ====
|
||||
@@ -36,7 +35,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOve
|
||||
var r10 = foo6(b); // error
|
||||
~
|
||||
!!! error TS2345: Argument of type 'new <T>(x: T, y: T) => string' is not assignable to parameter of type '{ new (x: any): string; new (x: any, y?: any): string; }'.
|
||||
!!! error TS2345: Signature 'new (x: any): string' has no corresponding signature in 'new <T>(x: T, y: T) => string'
|
||||
|
||||
function foo7<T>(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) {
|
||||
return cb;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts(28,20): error TS2345: Argument of type '<T>(x: T, y: T) => string' is not assignable to parameter of type '{ (x: any): string; (x: any, y?: any): string; }'.
|
||||
Signature '(x: any): string' has no corresponding signature in '<T>(x: T, y: T) => string'
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts (1 errors) ====
|
||||
@@ -33,7 +32,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOve
|
||||
var r10 = foo6(<T>(x: T, y: T) => ''); // error
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, y: T) => string' is not assignable to parameter of type '{ (x: any): string; (x: any, y?: any): string; }'.
|
||||
!!! error TS2345: Signature '(x: any): string' has no corresponding signature in '<T>(x: T, y: T) => string'
|
||||
|
||||
function foo7<T>(x:T, cb: { (x: T): string; (x: T, y?: T): string }) {
|
||||
return cb;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(12,1): error TS2322: Type '[string, number, boolean, boolean]' is not assignable to type '[string, number]'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => string | number | boolean' is not assignable to type '() => string | number'.
|
||||
Signature '(): string | number' has no corresponding signature in '() => string | number | boolean'
|
||||
Type 'string | number | boolean' is not assignable to type 'string | number'.
|
||||
Type 'boolean' is not assignable to type 'string | number'.
|
||||
Type 'boolean' is not assignable to type 'number'.
|
||||
Type 'string | number | boolean' is not assignable to type 'string | number'.
|
||||
Type 'boolean' is not assignable to type 'string | number'.
|
||||
Type 'boolean' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(14,1): error TS2322: Type '{ a: string; }' is not assignable to type 'string | number'.
|
||||
Type '{ a: string; }' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(22,1): error TS2322: Type '[number, string]' is not assignable to type '[string, number]'.
|
||||
@@ -34,10 +33,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTup
|
||||
!!! error TS2322: Type '[string, number, boolean, boolean]' is not assignable to type '[string, number]'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => string | number | boolean' is not assignable to type '() => string | number'.
|
||||
!!! error TS2322: Signature '(): string | number' has no corresponding signature in '() => string | number | boolean'
|
||||
!!! error TS2322: Type 'string | number | boolean' is not assignable to type 'string | number'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string | number'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string | number | boolean' is not assignable to type 'string | number'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string | number'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
var e3 = i1.tuple1[2]; // {}
|
||||
i1.tuple1[3] = { a: "string" };
|
||||
~~~~~~~~~~~~
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
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'.
|
||||
Signature '(x: number, y: string): Date' has no corresponding signature in '(x: number, y: string) => string'
|
||||
Type 'string' is not assignable to type 'Date'.
|
||||
Property 'toDateString' is missing in type 'String'.
|
||||
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'.
|
||||
Signature '(x: number, y: string): Date' has no corresponding signature in '(x: number, y: string) => string'
|
||||
Type 'string' is not assignable to type 'Date'.
|
||||
Type 'string' is not assignable to type 'Date'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericCombinators2.ts (2 errors) ====
|
||||
@@ -25,11 +23,9 @@ tests/cases/compiler/genericCombinators2.ts(16,43): error TS2345: Argument of ty
|
||||
var r5a = _.map<number, string, Date>(c2, (x, y) => { return x.toFixed() });
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'.
|
||||
!!! error TS2345: Signature '(x: number, y: string): Date' has no corresponding signature in '(x: number, y: string) => string'
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Property 'toDateString' is missing in type 'String'.
|
||||
!!! 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'.
|
||||
!!! error TS2345: Signature '(x: number, y: string): Date' has no corresponding signature in '(x: number, y: string) => string'
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Date'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Date'.
|
||||
@@ -1,21 +1,18 @@
|
||||
tests/cases/compiler/genericSpecializations3.ts(8,7): error TS2420: Class 'IntFooBad' incorrectly implements interface 'IFoo<number>'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '(x: string) => string' is not assignable to type '(x: number) => number'.
|
||||
Signature '(x: number): number' has no corresponding signature in '(x: string) => string'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/genericSpecializations3.ts(28,1): error TS2322: Type 'StringFoo2' is not assignable to type 'IntFoo'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '(x: string) => string' is not assignable to type '(x: number) => number'.
|
||||
Signature '(x: number): number' has no corresponding signature in '(x: string) => string'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2322: Type 'IntFoo' is not assignable to type 'StringFoo2'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '(x: number) => number' is not assignable to type '(x: string) => string'.
|
||||
Signature '(x: string): string' has no corresponding signature in '(x: number) => number'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericSpecializations3.ts (3 errors) ====
|
||||
@@ -31,9 +28,8 @@ tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2322: Type 'IntFo
|
||||
!!! error TS2420: Class 'IntFooBad' incorrectly implements interface 'IFoo<number>'.
|
||||
!!! error TS2420: Types of property 'foo' are incompatible.
|
||||
!!! error TS2420: Type '(x: string) => string' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2420: Signature '(x: number): number' has no corresponding signature in '(x: string) => string'
|
||||
!!! error TS2420: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2420: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2420: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2420: Type 'string' is not assignable to type 'number'.
|
||||
foo(x: string): string { return null; }
|
||||
}
|
||||
|
||||
@@ -58,17 +54,15 @@ tests/cases/compiler/genericSpecializations3.ts(29,1): error TS2322: Type 'IntFo
|
||||
!!! error TS2322: Type 'StringFoo2' is not assignable to type 'IntFoo'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2322: Signature '(x: number): number' has no corresponding signature in '(x: string) => string'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
stringFoo2 = intFoo; // error
|
||||
~~~~~~~~~~
|
||||
!!! error TS2322: Type 'IntFoo' is not assignable to type 'StringFoo2'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type '(x: number) => number' is not assignable to type '(x: string) => string'.
|
||||
!!! error TS2322: Signature '(x: string): string' has no corresponding signature in '(x: number) => number'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
class StringFoo3 implements IFoo<string> { // error
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
tests/cases/compiler/genericTypeAssertions2.ts(10,5): error TS2322: Type 'B<string>' is not assignable to type 'A<number>'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/genericTypeAssertions2.ts(11,5): error TS2322: Type 'A<number>' is not assignable to type 'B<number>'.
|
||||
Property 'bar' is missing in type 'A<number>'.
|
||||
tests/cases/compiler/genericTypeAssertions2.ts(13,21): error TS2352: Neither type 'undefined[]' nor type 'A<number>' is assignable to the other.
|
||||
@@ -25,9 +24,8 @@ tests/cases/compiler/genericTypeAssertions2.ts(13,21): error TS2352: Neither typ
|
||||
!!! error TS2322: Type 'B<string>' is not assignable to type 'A<number>'.
|
||||
!!! error TS2322: Types of property 'foo' are incompatible.
|
||||
!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'.
|
||||
!!! error TS2322: Signature '(x: number): void' has no corresponding signature in '(x: string) => void'
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
var r3: B<number> = <A<number>>new B(); // error
|
||||
~~
|
||||
!!! error TS2322: Type 'A<number>' is not assignable to type 'B<number>'.
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(4,7): error TS2420: Class 'X<T>' incorrectly implements interface 'I'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void'.
|
||||
Signature '(a: { a: number; }): void' has no corresponding signature in '(a: T) => void'
|
||||
Types of parameters 'a' and 'a' are incompatible.
|
||||
Type 'T' is not assignable to type '{ a: number; }'.
|
||||
Type '{ a: string; }' is not assignable to type '{ a: number; }'.
|
||||
Types of property 'a' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(8,5): error TS2322: Type 'X<{ a: string; }>' is not assignable to type 'I'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void'.
|
||||
Signature '(a: { a: number; }): void' has no corresponding signature in '(a: { a: string; }) => void'
|
||||
Types of parameters 'a' and 'a' are incompatible.
|
||||
Types of parameters 'a' and 'a' are incompatible.
|
||||
Type 'T' is not assignable to type '{ a: number; }'.
|
||||
Type '{ a: string; }' is not assignable to type '{ a: number; }'.
|
||||
Types of property 'a' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(8,5): error TS2322: Type 'X<{ a: string; }>' is not assignable to type 'I'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void'.
|
||||
Types of parameters 'a' and 'a' are incompatible.
|
||||
Type '{ a: string; }' is not assignable to type '{ a: number; }'.
|
||||
Types of property 'a' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts (2 errors) ====
|
||||
@@ -26,12 +24,11 @@ tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(8,5): error TS2322
|
||||
!!! error TS2420: Class 'X<T>' incorrectly implements interface 'I'.
|
||||
!!! error TS2420: Types of property 'f' are incompatible.
|
||||
!!! error TS2420: Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void'.
|
||||
!!! error TS2420: Signature '(a: { a: number; }): void' has no corresponding signature in '(a: T) => void'
|
||||
!!! error TS2420: Types of parameters 'a' and 'a' are incompatible.
|
||||
!!! error TS2420: Type 'T' is not assignable to type '{ a: number; }'.
|
||||
!!! error TS2420: Type '{ a: string; }' is not assignable to type '{ a: number; }'.
|
||||
!!! error TS2420: Types of property 'a' are incompatible.
|
||||
!!! error TS2420: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2420: Types of parameters 'a' and 'a' are incompatible.
|
||||
!!! error TS2420: Type 'T' is not assignable to type '{ a: number; }'.
|
||||
!!! error TS2420: Type '{ a: string; }' is not assignable to type '{ a: number; }'.
|
||||
!!! error TS2420: Types of property 'a' are incompatible.
|
||||
!!! error TS2420: Type 'string' is not assignable to type 'number'.
|
||||
f(a: T): void { }
|
||||
}
|
||||
var x = new X<{ a: string }>();
|
||||
@@ -40,9 +37,8 @@ tests/cases/compiler/genericTypeWithNonGenericBaseMisMatch.ts(8,5): error TS2322
|
||||
!!! error TS2322: Type 'X<{ a: string; }>' is not assignable to type 'I'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void'.
|
||||
!!! error TS2322: Signature '(a: { a: number; }): void' has no corresponding signature in '(a: { a: string; }) => void'
|
||||
!!! error TS2322: Types of parameters 'a' and 'a' are incompatible.
|
||||
!!! error TS2322: Type '{ a: string; }' is not assignable to type '{ a: number; }'.
|
||||
!!! error TS2322: Types of property 'a' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'a' and 'a' are incompatible.
|
||||
!!! error TS2322: Type '{ a: string; }' is not assignable to type '{ a: number; }'.
|
||||
!!! error TS2322: Types of property 'a' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -2,8 +2,7 @@ tests/cases/compiler/generics4.ts(7,1): error TS2322: Type 'C<Y>' is not assigna
|
||||
Type 'Y' is not assignable to type 'X'.
|
||||
Types of property 'f' are incompatible.
|
||||
Type '() => boolean' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '() => boolean'
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
Type 'boolean' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/generics4.ts (1 errors) ====
|
||||
@@ -19,5 +18,4 @@ tests/cases/compiler/generics4.ts(7,1): error TS2322: Type 'C<Y>' is not assigna
|
||||
!!! error TS2322: Type 'Y' is not assignable to type 'X'.
|
||||
!!! error TS2322: Types of property 'f' are incompatible.
|
||||
!!! error TS2322: Type '() => boolean' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Signature '(): string' has no corresponding signature in '() => boolean'
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
|
||||
@@ -1,14 +1,12 @@
|
||||
tests/cases/compiler/implementGenericWithMismatchedTypes.ts(7,7): error TS2420: Class 'C<T>' incorrectly implements interface 'IFoo<T>'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '(x: string) => number' is not assignable to type '(x: T) => T'.
|
||||
Signature '(x: T): T' has no corresponding signature in '(x: string) => number'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'T'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'string' is not assignable to type 'T'.
|
||||
tests/cases/compiler/implementGenericWithMismatchedTypes.ts(16,7): error TS2420: Class 'C2<T>' incorrectly implements interface 'IFoo2<T>'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '<Tstring>(x: Tstring) => number' is not assignable to type '(x: T) => T'.
|
||||
Signature '(x: T): T' has no corresponding signature in '<Tstring>(x: Tstring) => number'
|
||||
Type 'number' is not assignable to type 'T'.
|
||||
Type 'number' is not assignable to type 'T'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/implementGenericWithMismatchedTypes.ts (2 errors) ====
|
||||
@@ -23,9 +21,8 @@ tests/cases/compiler/implementGenericWithMismatchedTypes.ts(16,7): error TS2420:
|
||||
!!! error TS2420: Class 'C<T>' incorrectly implements interface 'IFoo<T>'.
|
||||
!!! error TS2420: Types of property 'foo' are incompatible.
|
||||
!!! error TS2420: Type '(x: string) => number' is not assignable to type '(x: T) => T'.
|
||||
!!! error TS2420: Signature '(x: T): T' has no corresponding signature in '(x: string) => number'
|
||||
!!! error TS2420: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2420: Type 'string' is not assignable to type 'T'.
|
||||
!!! error TS2420: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2420: Type 'string' is not assignable to type 'T'.
|
||||
foo(x: string): number {
|
||||
return null;
|
||||
}
|
||||
@@ -39,8 +36,7 @@ tests/cases/compiler/implementGenericWithMismatchedTypes.ts(16,7): error TS2420:
|
||||
!!! error TS2420: Class 'C2<T>' incorrectly implements interface 'IFoo2<T>'.
|
||||
!!! error TS2420: Types of property 'foo' are incompatible.
|
||||
!!! error TS2420: Type '<Tstring>(x: Tstring) => number' is not assignable to type '(x: T) => T'.
|
||||
!!! error TS2420: Signature '(x: T): T' has no corresponding signature in '<Tstring>(x: Tstring) => number'
|
||||
!!! error TS2420: Type 'number' is not assignable to type 'T'.
|
||||
!!! error TS2420: Type 'number' is not assignable to type 'T'.
|
||||
foo<Tstring>(x: Tstring): number {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
tests/cases/compiler/incompatibleTypes.ts(5,7): error TS2420: Class 'C1' incorrectly implements interface 'IFoo1'.
|
||||
Types of property 'p1' are incompatible.
|
||||
Type '() => string' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '() => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/incompatibleTypes.ts(15,7): error TS2420: Class 'C2' incorrectly implements interface 'IFoo2'.
|
||||
Types of property 'p1' are incompatible.
|
||||
Type '(n: number) => number' is not assignable to type '(s: string) => number'.
|
||||
Signature '(s: string): number' has no corresponding signature in '(n: number) => number'
|
||||
Types of parameters 'n' and 's' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'n' and 's' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/incompatibleTypes.ts(25,7): error TS2420: Class 'C3' incorrectly implements interface 'IFoo3'.
|
||||
Types of property 'p1' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
@@ -19,8 +17,7 @@ tests/cases/compiler/incompatibleTypes.ts(33,7): error TS2420: Class 'C4' incorr
|
||||
tests/cases/compiler/incompatibleTypes.ts(42,5): error TS2345: Argument of type 'C1' is not assignable to parameter of type 'IFoo2'.
|
||||
Types of property 'p1' are incompatible.
|
||||
Type '() => string' is not assignable to type '(s: string) => number'.
|
||||
Signature '(s: string): number' has no corresponding signature in '() => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/incompatibleTypes.ts(49,7): error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'.
|
||||
Object literal may only specify known properties, and 'e' does not exist in type '{ c: { b: string; }; d: string; }'.
|
||||
tests/cases/compiler/incompatibleTypes.ts(66,47): error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'.
|
||||
@@ -28,7 +25,6 @@ tests/cases/compiler/incompatibleTypes.ts(66,47): error TS2322: Type '{ e: numbe
|
||||
tests/cases/compiler/incompatibleTypes.ts(72,5): error TS2322: Type 'number' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in 'Number'
|
||||
tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => number' is not assignable to type '() => any'.
|
||||
Signature '(): any' has no corresponding signature in '(a: any) => number'
|
||||
|
||||
|
||||
==== tests/cases/compiler/incompatibleTypes.ts (9 errors) ====
|
||||
@@ -41,8 +37,7 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) =>
|
||||
!!! error TS2420: Class 'C1' incorrectly implements interface 'IFoo1'.
|
||||
!!! error TS2420: Types of property 'p1' are incompatible.
|
||||
!!! error TS2420: Type '() => string' is not assignable to type '() => number'.
|
||||
!!! error TS2420: Signature '(): number' has no corresponding signature in '() => string'
|
||||
!!! error TS2420: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2420: Type 'string' is not assignable to type 'number'.
|
||||
public p1() {
|
||||
return "s";
|
||||
}
|
||||
@@ -57,9 +52,8 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) =>
|
||||
!!! error TS2420: Class 'C2' incorrectly implements interface 'IFoo2'.
|
||||
!!! error TS2420: Types of property 'p1' are incompatible.
|
||||
!!! error TS2420: Type '(n: number) => number' is not assignable to type '(s: string) => number'.
|
||||
!!! error TS2420: Signature '(s: string): number' has no corresponding signature in '(n: number) => number'
|
||||
!!! error TS2420: Types of parameters 'n' and 's' are incompatible.
|
||||
!!! error TS2420: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2420: Types of parameters 'n' and 's' are incompatible.
|
||||
!!! error TS2420: Type 'number' is not assignable to type 'string'.
|
||||
public p1(n:number) {
|
||||
return 0;
|
||||
}
|
||||
@@ -100,8 +94,7 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) =>
|
||||
!!! error TS2345: Argument of type 'C1' is not assignable to parameter of type 'IFoo2'.
|
||||
!!! error TS2345: Types of property 'p1' are incompatible.
|
||||
!!! error TS2345: Type '() => string' is not assignable to type '(s: string) => number'.
|
||||
!!! error TS2345: Signature '(s: string): number' has no corresponding signature in '() => string'
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
function of1(n: { a: { a: string; }; b: string; }): number;
|
||||
@@ -145,5 +138,4 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) =>
|
||||
var fp1: () =>any = a => 0;
|
||||
~~~
|
||||
!!! error TS2322: Type '(a: any) => number' is not assignable to type '() => any'.
|
||||
!!! error TS2322: Signature '(): any' has no corresponding signature in '(a: any) => number'
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/inheritance.ts(30,7): error TS2415: Class 'Baad' incorrectly extends base class 'Good'.
|
||||
Types of property 'g' are incompatible.
|
||||
Type '(n: number) => number' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '(n: number) => number'
|
||||
tests/cases/compiler/inheritance.ts(31,12): error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function.
|
||||
|
||||
|
||||
@@ -40,7 +39,6 @@ tests/cases/compiler/inheritance.ts(31,12): error TS2425: Class 'Good' defines i
|
||||
!!! error TS2415: Class 'Baad' incorrectly extends base class 'Good'.
|
||||
!!! error TS2415: Types of property 'g' are incompatible.
|
||||
!!! error TS2415: Type '(n: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2415: Signature '(): number' has no corresponding signature in '(n: number) => number'
|
||||
public f(): number { return 0; }
|
||||
~
|
||||
!!! error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function.
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
tests/cases/compiler/inheritedModuleMembersForClodule.ts(7,7): error TS2417: Class static side 'typeof D' incorrectly extends base class static side 'typeof C'.
|
||||
Types of property 'foo' are incompatible.
|
||||
Type '() => number' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '() => number'
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/inheritedModuleMembersForClodule.ts (1 errors) ====
|
||||
@@ -17,8 +16,7 @@ tests/cases/compiler/inheritedModuleMembersForClodule.ts(7,7): error TS2417: Cla
|
||||
!!! error TS2417: Class static side 'typeof D' incorrectly extends base class static side 'typeof C'.
|
||||
!!! error TS2417: Types of property 'foo' are incompatible.
|
||||
!!! error TS2417: Type '() => number' is not assignable to type '() => string'.
|
||||
!!! error TS2417: Signature '(): string' has no corresponding signature in '() => number'
|
||||
!!! error TS2417: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2417: Type 'number' is not assignable to type 'string'.
|
||||
}
|
||||
|
||||
module D {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/instanceMemberAssignsToClassPrototype.ts(7,9): error TS2322: Type '() => void' is not assignable to type '(x: number) => number'.
|
||||
Signature '(x: number): number' has no corresponding signature in '() => void'
|
||||
Type 'void' is not assignable to type 'number'.
|
||||
Type 'void' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/instanceMemberAssignsToClassPrototype.ts (1 errors) ====
|
||||
@@ -13,8 +12,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara
|
||||
C.prototype.bar = () => { } // error
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2322: Signature '(x: number): number' has no corresponding signature in '() => void'
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'number'.
|
||||
C.prototype.bar = (x) => x; // ok
|
||||
C.prototype.bar = (x: number) => 1; // ok
|
||||
return 1;
|
||||
|
||||
@@ -66,8 +66,7 @@ tests/cases/compiler/intTypeCheck.ts(170,17): error TS2350: Only a void function
|
||||
tests/cases/compiler/intTypeCheck.ts(171,5): error TS2322: Type 'Base' is not assignable to type 'i6'.
|
||||
Signature '(): any' has no corresponding signature in 'Base'
|
||||
tests/cases/compiler/intTypeCheck.ts(173,5): error TS2322: Type '() => void' is not assignable to type 'i6'.
|
||||
Signature '(): number' has no corresponding signature in '() => void'
|
||||
Type 'void' is not assignable to type 'number'.
|
||||
Type 'void' is not assignable to type 'number'.
|
||||
tests/cases/compiler/intTypeCheck.ts(176,5): error TS2322: Type 'boolean' is not assignable to type 'i6'.
|
||||
Signature '(): any' has no corresponding signature in 'Boolean'
|
||||
tests/cases/compiler/intTypeCheck.ts(176,21): error TS1109: Expression expected.
|
||||
@@ -382,8 +381,7 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit
|
||||
var obj61: i6 = function () { };
|
||||
~~~~~
|
||||
!!! error TS2322: Type '() => void' is not assignable to type 'i6'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '() => void'
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'number'.
|
||||
//var obj62: i6 = function foo() { };
|
||||
var obj63: i6 = <i6> anyVar;
|
||||
var obj64: i6 = new <i6> anyVar;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
tests/cases/compiler/interfaceAssignmentCompat.ts(32,18): error TS2345: Argument of type '(a: IFrenchEye, b: IFrenchEye) => number' is not assignable to parameter of type '(a: IEye, b: IEye) => number'.
|
||||
Signature '(a: IEye, b: IEye): number' has no corresponding signature in '(a: IFrenchEye, b: IFrenchEye) => number'
|
||||
Types of parameters 'a' and 'a' are incompatible.
|
||||
Type 'IFrenchEye' is not assignable to type 'IEye'.
|
||||
Property 'color' is missing in type 'IFrenchEye'.
|
||||
Types of parameters 'a' and 'a' are incompatible.
|
||||
Type 'IFrenchEye' is not assignable to type 'IEye'.
|
||||
Property 'color' is missing in type 'IFrenchEye'.
|
||||
tests/cases/compiler/interfaceAssignmentCompat.ts(37,29): error TS2339: Property '_map' does not exist on type 'typeof Color'.
|
||||
tests/cases/compiler/interfaceAssignmentCompat.ts(42,13): error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye'.
|
||||
Property 'coleur' is missing in type 'IEye'.
|
||||
@@ -45,10 +44,9 @@ tests/cases/compiler/interfaceAssignmentCompat.ts(44,9): error TS2322: Type 'IEy
|
||||
x=x.sort(CompareYeux); // parameter mismatch
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(a: IFrenchEye, b: IFrenchEye) => number' is not assignable to parameter of type '(a: IEye, b: IEye) => number'.
|
||||
!!! error TS2345: Signature '(a: IEye, b: IEye): number' has no corresponding signature in '(a: IFrenchEye, b: IFrenchEye) => number'
|
||||
!!! error TS2345: Types of parameters 'a' and 'a' are incompatible.
|
||||
!!! error TS2345: Type 'IFrenchEye' is not assignable to type 'IEye'.
|
||||
!!! error TS2345: Property 'color' is missing in type 'IFrenchEye'.
|
||||
!!! error TS2345: Types of parameters 'a' and 'a' are incompatible.
|
||||
!!! error TS2345: Type 'IFrenchEye' is not assignable to type 'IEye'.
|
||||
!!! error TS2345: Property 'color' is missing in type 'IFrenchEye'.
|
||||
// type of z inferred from specialized array type
|
||||
var z=x.sort(CompareEyes); // ok
|
||||
|
||||
|
||||
@@ -3,9 +3,8 @@ tests/cases/compiler/interfaceImplementation7.ts(4,11): error TS2320: Interface
|
||||
tests/cases/compiler/interfaceImplementation7.ts(7,7): error TS2420: Class 'C1' incorrectly implements interface 'i4'.
|
||||
Types of property 'name' are incompatible.
|
||||
Type '() => string' is not assignable to type '() => { s: string; n: number; }'.
|
||||
Signature '(): { s: string; n: number; }' has no corresponding signature in '() => string'
|
||||
Type 'string' is not assignable to type '{ s: string; n: number; }'.
|
||||
Property 's' is missing in type 'String'.
|
||||
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,9 +22,8 @@ tests/cases/compiler/interfaceImplementation7.ts(7,7): error TS2420: Class 'C1'
|
||||
!!! error TS2420: Class 'C1' incorrectly implements interface 'i4'.
|
||||
!!! error TS2420: Types of property 'name' are incompatible.
|
||||
!!! error TS2420: Type '() => string' is not assignable to type '() => { s: string; n: number; }'.
|
||||
!!! error TS2420: Signature '(): { s: string; n: number; }' has no corresponding signature in '() => string'
|
||||
!!! error TS2420: Type 'string' is not assignable to type '{ s: string; n: number; }'.
|
||||
!!! error TS2420: Property 's' is missing in type 'String'.
|
||||
!!! 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,13 +1,11 @@
|
||||
tests/cases/conformance/es6/spread/iteratorSpreadInArray9.ts(1,17): error TS2322: Type 'SymbolIterator' is not assignable to type 'Iterable<symbol>'.
|
||||
Types of property '[Symbol.iterator]' are incompatible.
|
||||
Type '() => SymbolIterator' is not assignable to type '() => Iterator<symbol>'.
|
||||
Signature '(): Iterator<symbol>' has no corresponding signature in '() => SymbolIterator'
|
||||
Type 'SymbolIterator' is not assignable to type 'Iterator<symbol>'.
|
||||
Types of property 'next' are incompatible.
|
||||
Type '() => { value: symbol; }' is not assignable to type '(value?: any) => IteratorResult<symbol>'.
|
||||
Signature '(value?: any): IteratorResult<symbol>' has no corresponding signature in '() => { value: symbol; }'
|
||||
Type '{ value: symbol; }' is not assignable to type 'IteratorResult<symbol>'.
|
||||
Property 'done' is missing in type '{ value: symbol; }'.
|
||||
Type 'SymbolIterator' is not assignable to type 'Iterator<symbol>'.
|
||||
Types of property 'next' are incompatible.
|
||||
Type '() => { value: symbol; }' is not assignable to type '(value?: any) => IteratorResult<symbol>'.
|
||||
Type '{ value: symbol; }' is not assignable to type 'IteratorResult<symbol>'.
|
||||
Property 'done' is missing in type '{ value: symbol; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/spread/iteratorSpreadInArray9.ts (1 errors) ====
|
||||
@@ -16,13 +14,11 @@ tests/cases/conformance/es6/spread/iteratorSpreadInArray9.ts(1,17): error TS2322
|
||||
!!! error TS2322: Type 'SymbolIterator' is not assignable to type 'Iterable<symbol>'.
|
||||
!!! error TS2322: Types of property '[Symbol.iterator]' are incompatible.
|
||||
!!! error TS2322: Type '() => SymbolIterator' is not assignable to type '() => Iterator<symbol>'.
|
||||
!!! error TS2322: Signature '(): Iterator<symbol>' has no corresponding signature in '() => SymbolIterator'
|
||||
!!! error TS2322: Type 'SymbolIterator' is not assignable to type 'Iterator<symbol>'.
|
||||
!!! error TS2322: Types of property 'next' are incompatible.
|
||||
!!! error TS2322: Type '() => { value: symbol; }' is not assignable to type '(value?: any) => IteratorResult<symbol>'.
|
||||
!!! error TS2322: Signature '(value?: any): IteratorResult<symbol>' has no corresponding signature in '() => { value: symbol; }'
|
||||
!!! error TS2322: Type '{ value: symbol; }' is not assignable to type 'IteratorResult<symbol>'.
|
||||
!!! error TS2322: Property 'done' is missing in type '{ value: symbol; }'.
|
||||
!!! error TS2322: Type 'SymbolIterator' is not assignable to type 'Iterator<symbol>'.
|
||||
!!! error TS2322: Types of property 'next' are incompatible.
|
||||
!!! error TS2322: Type '() => { value: symbol; }' is not assignable to type '(value?: any) => IteratorResult<symbol>'.
|
||||
!!! error TS2322: Type '{ value: symbol; }' is not assignable to type 'IteratorResult<symbol>'.
|
||||
!!! error TS2322: Property 'done' is missing in type '{ value: symbol; }'.
|
||||
|
||||
class SymbolIterator {
|
||||
next() {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/compiler/lambdaArgCrash.ts(27,25): error TS2304: Cannot find name 'ItemSet'.
|
||||
tests/cases/compiler/lambdaArgCrash.ts(29,14): error TS2345: Argument of type '(items: any) => void' is not assignable to parameter of type '() => any'.
|
||||
Signature '(): any' has no corresponding signature in '(items: any) => void'
|
||||
|
||||
|
||||
==== tests/cases/compiler/lambdaArgCrash.ts (2 errors) ====
|
||||
@@ -37,7 +36,6 @@ tests/cases/compiler/lambdaArgCrash.ts(29,14): error TS2345: Argument of type '(
|
||||
super.add(listener);
|
||||
~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(items: any) => void' is not assignable to parameter of type '() => any'.
|
||||
!!! error TS2345: Signature '(): any' has no corresponding signature in '(items: any) => void'
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ tests/cases/compiler/multipleInheritance.ts(18,21): error TS1174: Classes can on
|
||||
tests/cases/compiler/multipleInheritance.ts(34,7): error TS2415: Class 'Baad' incorrectly extends base class 'Good'.
|
||||
Types of property 'g' are incompatible.
|
||||
Type '(n: number) => number' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '(n: number) => number'
|
||||
tests/cases/compiler/multipleInheritance.ts(35,12): error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function.
|
||||
|
||||
|
||||
@@ -50,7 +49,6 @@ tests/cases/compiler/multipleInheritance.ts(35,12): error TS2425: Class 'Good' d
|
||||
!!! error TS2415: Class 'Baad' incorrectly extends base class 'Good'.
|
||||
!!! error TS2415: Types of property 'g' are incompatible.
|
||||
!!! error TS2415: Type '(n: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2415: Signature '(): number' has no corresponding signature in '(n: number) => number'
|
||||
public f(): number { return 0; }
|
||||
~
|
||||
!!! error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function.
|
||||
|
||||
+6
-12
@@ -1,18 +1,15 @@
|
||||
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(7,1): error TS2322: Type 'I' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type '() => void' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '() => void'
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(14,1): error TS2322: Type 'C' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type '() => void' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '() => void'
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts(20,1): error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type '() => void' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '() => void'
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat.ts (3 errors) ====
|
||||
@@ -27,8 +24,7 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'Object'.
|
||||
!!! error TS2322: Types of property 'toString' are incompatible.
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Signature '(): string' has no corresponding signature in '() => void'
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
i = o; // ok
|
||||
|
||||
class C {
|
||||
@@ -40,8 +36,7 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'Object'.
|
||||
!!! error TS2322: Types of property 'toString' are incompatible.
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Signature '(): string' has no corresponding signature in '() => void'
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
c = o; // ok
|
||||
|
||||
var a = {
|
||||
@@ -52,6 +47,5 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC
|
||||
!!! error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object'.
|
||||
!!! error TS2322: Types of property 'toString' are incompatible.
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Signature '(): string' has no corresponding signature in '() => void'
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
a = o; // ok
|
||||
+10
-20
@@ -1,28 +1,23 @@
|
||||
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(7,1): error TS2322: Type 'I' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type '() => number' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '() => number'
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(8,1): error TS2322: Type 'Object' is not assignable to type 'I'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type '() => string' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '() => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(14,1): error TS2322: Type 'C' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type '() => number' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '() => number'
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(15,1): error TS2322: Type 'Object' is not assignable to type 'C'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type '() => string' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '() => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts(20,1): error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object'.
|
||||
Types of property 'toString' are incompatible.
|
||||
Type '() => void' is not assignable to type '() => string'.
|
||||
Signature '(): string' has no corresponding signature in '() => void'
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
Type 'void' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentCompat2.ts (5 errors) ====
|
||||
@@ -37,15 +32,13 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC
|
||||
!!! error TS2322: Type 'I' is not assignable to type 'Object'.
|
||||
!!! error TS2322: Types of property 'toString' are incompatible.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Signature '(): string' has no corresponding signature in '() => number'
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
i = o; // error
|
||||
~
|
||||
!!! error TS2322: Type 'Object' is not assignable to type 'I'.
|
||||
!!! error TS2322: Types of property 'toString' are incompatible.
|
||||
!!! error TS2322: Type '() => string' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '() => string'
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
class C {
|
||||
toString(): number { return 1; }
|
||||
@@ -56,15 +49,13 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC
|
||||
!!! error TS2322: Type 'C' is not assignable to type 'Object'.
|
||||
!!! error TS2322: Types of property 'toString' are incompatible.
|
||||
!!! error TS2322: Type '() => number' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Signature '(): string' has no corresponding signature in '() => number'
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
c = o; // error
|
||||
~
|
||||
!!! error TS2322: Type 'Object' is not assignable to type 'C'.
|
||||
!!! error TS2322: Types of property 'toString' are incompatible.
|
||||
!!! error TS2322: Type '() => string' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '() => string'
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
var a = {
|
||||
toString: () => { }
|
||||
@@ -74,6 +65,5 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfObjectAssignmentC
|
||||
!!! error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object'.
|
||||
!!! error TS2322: Types of property 'toString' are incompatible.
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '() => string'.
|
||||
!!! error TS2322: Signature '(): string' has no corresponding signature in '() => void'
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'string'.
|
||||
a = o; // ok
|
||||
@@ -1,10 +1,8 @@
|
||||
tests/cases/compiler/optionalFunctionArgAssignability.ts(7,1): error TS2322: Type '<U>(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise<U>' is not assignable to type '<U>(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise<U>'.
|
||||
Signature '<U>(onFulfill?: (value: string) => U, onReject?: (reason: any) => U): Promise<U>' has no corresponding signature in '<U>(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise<U>'
|
||||
Types of parameters 'onFulFill' and 'onFulfill' are incompatible.
|
||||
Type '(value: number) => any' is not assignable to type '(value: string) => any'.
|
||||
Signature '(value: string): any' has no corresponding signature in '(value: number) => any'
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'onFulFill' and 'onFulfill' are incompatible.
|
||||
Type '(value: number) => any' is not assignable to type '(value: string) => any'.
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/optionalFunctionArgAssignability.ts (1 errors) ====
|
||||
@@ -17,10 +15,8 @@ tests/cases/compiler/optionalFunctionArgAssignability.ts(7,1): error TS2322: Typ
|
||||
a = b; // error because number is not assignable to string
|
||||
~
|
||||
!!! error TS2322: Type '<U>(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise<U>' is not assignable to type '<U>(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise<U>'.
|
||||
!!! error TS2322: Signature '<U>(onFulfill?: (value: string) => U, onReject?: (reason: any) => U): Promise<U>' has no corresponding signature in '<U>(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise<U>'
|
||||
!!! error TS2322: Types of parameters 'onFulFill' and 'onFulfill' are incompatible.
|
||||
!!! error TS2322: Type '(value: number) => any' is not assignable to type '(value: string) => any'.
|
||||
!!! error TS2322: Signature '(value: string): any' has no corresponding signature in '(value: number) => any'
|
||||
!!! error TS2322: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2322: Types of parameters 'onFulFill' and 'onFulfill' are incompatible.
|
||||
!!! error TS2322: Type '(value: number) => any' is not assignable to type '(value: string) => any'.
|
||||
!!! error TS2322: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/optionalParamAssignmentCompat.ts(10,5): error TS2322: Type '(p1?: string) => I1' is not assignable to type 'I1'.
|
||||
Signature '(p1: number, p2: string): void' has no corresponding signature in '(p1?: string) => I1'
|
||||
Types of parameters 'p1' and 'p1' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'p1' and 'p1' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/optionalParamAssignmentCompat.ts (1 errors) ====
|
||||
@@ -17,7 +16,6 @@ tests/cases/compiler/optionalParamAssignmentCompat.ts(10,5): error TS2322: Type
|
||||
var d: I1 = i2.m1; // should error
|
||||
~
|
||||
!!! error TS2322: Type '(p1?: string) => I1' is not assignable to type 'I1'.
|
||||
!!! error TS2322: Signature '(p1: number, p2: string): void' has no corresponding signature in '(p1?: string) => I1'
|
||||
!!! error TS2322: Types of parameters 'p1' and 'p1' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'p1' and 'p1' are incompatible.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
tests/cases/compiler/optionalParamTypeComparison.ts(4,1): error TS2322: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void'.
|
||||
Signature '(s: string, n?: number): void' has no corresponding signature in '(s: string, b?: boolean) => void'
|
||||
Types of parameters 'b' and 'n' are incompatible.
|
||||
Type 'boolean' is not assignable to type 'number'.
|
||||
Types of parameters 'b' and 'n' are incompatible.
|
||||
Type 'boolean' is not assignable to type 'number'.
|
||||
tests/cases/compiler/optionalParamTypeComparison.ts(5,1): error TS2322: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void'.
|
||||
Signature '(s: string, b?: boolean): void' has no corresponding signature in '(s: string, n?: number) => void'
|
||||
Types of parameters 'n' and 'b' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
Types of parameters 'n' and 'b' are incompatible.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/optionalParamTypeComparison.ts (2 errors) ====
|
||||
@@ -15,12 +13,10 @@ tests/cases/compiler/optionalParamTypeComparison.ts(5,1): error TS2322: Type '(s
|
||||
f = g;
|
||||
~
|
||||
!!! error TS2322: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void'.
|
||||
!!! error TS2322: Signature '(s: string, n?: number): void' has no corresponding signature in '(s: string, b?: boolean) => void'
|
||||
!!! error TS2322: Types of parameters 'b' and 'n' are incompatible.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
!!! error TS2322: Types of parameters 'b' and 'n' are incompatible.
|
||||
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
|
||||
g = f;
|
||||
~
|
||||
!!! error TS2322: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void'.
|
||||
!!! error TS2322: Signature '(s: string, b?: boolean): void' has no corresponding signature in '(s: string, n?: number) => void'
|
||||
!!! error TS2322: Types of parameters 'n' and 'b' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2322: Types of parameters 'n' and 'b' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/compiler/overloadResolutionOverCTLambda.ts(2,5): error TS2345: Argument of type '(a: number) => number' is not assignable to parameter of type '(item: number) => boolean'.
|
||||
Signature '(item: number): boolean' has no corresponding signature in '(a: number) => number'
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
Type 'number' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/overloadResolutionOverCTLambda.ts (1 errors) ====
|
||||
@@ -8,5 +7,4 @@ tests/cases/compiler/overloadResolutionOverCTLambda.ts(2,5): error TS2345: Argum
|
||||
foo(a => a); // can not convert (number)=>bool to (number)=>number
|
||||
~~~~~~
|
||||
!!! error TS2345: Argument of type '(a: number) => number' is not assignable to parameter of type '(item: number) => boolean'.
|
||||
!!! error TS2345: Signature '(item: number): boolean' has no corresponding signature in '(a: number) => number'
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'boolean'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'boolean'.
|
||||
+6
-8
@@ -4,10 +4,9 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(14,37):
|
||||
tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,5): error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,38): error TS2344: Type 'D' does not satisfy the constraint 'A'.
|
||||
tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(18,27): error TS2345: Argument of type '(x: D) => G<D>' is not assignable to parameter of type '(x: B) => any'.
|
||||
Signature '(x: B): any' has no corresponding signature in '(x: D) => G<D>'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'D' is not assignable to type 'B'.
|
||||
Property 'x' is missing in type 'D'.
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'D' is not assignable to type 'B'.
|
||||
Property 'x' is missing in type 'D'.
|
||||
tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,14): error TS2344: Type 'D' does not satisfy the constraint 'A'.
|
||||
|
||||
|
||||
@@ -49,8 +48,7 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,14):
|
||||
});
|
||||
~
|
||||
!!! error TS2345: Argument of type '(x: D) => G<D>' is not assignable to parameter of type '(x: B) => any'.
|
||||
!!! error TS2345: Signature '(x: B): any' has no corresponding signature in '(x: D) => G<D>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2345: Type 'D' is not assignable to type 'B'.
|
||||
!!! error TS2345: Property 'x' is missing in type 'D'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'x' are incompatible.
|
||||
!!! error TS2345: Type 'D' is not assignable to type 'B'.
|
||||
!!! error TS2345: Property 'x' is missing in type 'D'.
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
tests/cases/compiler/overloadsWithProvisionalErrors.ts(6,6): error TS2345: Argument of type '(s: string) => {}' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'.
|
||||
Signature '(s: string): { a: number; b: number; }' has no corresponding signature in '(s: string) => {}'
|
||||
Type '{}' is not assignable to type '{ a: number; b: number; }'.
|
||||
Property 'a' is missing in type '{}'.
|
||||
Type '{}' is not assignable to type '{ a: number; b: number; }'.
|
||||
Property 'a' is missing in type '{}'.
|
||||
tests/cases/compiler/overloadsWithProvisionalErrors.ts(7,17): error TS2304: Cannot find name 'blah'.
|
||||
tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,6): error TS2345: Argument of type '(s: string) => { a: any; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'.
|
||||
Signature '(s: string): { a: number; b: number; }' has no corresponding signature in '(s: string) => { a: any; }'
|
||||
Type '{ a: any; }' is not assignable to type '{ a: number; b: number; }'.
|
||||
Property 'b' is missing in type '{ a: any; }'.
|
||||
Type '{ a: any; }' is not assignable to type '{ a: number; b: number; }'.
|
||||
Property 'b' is missing in type '{ a: any; }'.
|
||||
tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,17): error TS2304: Cannot find name 'blah'.
|
||||
|
||||
|
||||
@@ -19,17 +17,15 @@ tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,17): error TS2304: Cann
|
||||
func(s => ({})); // Error for no applicable overload (object type is missing a and b)
|
||||
~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(s: string) => {}' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'.
|
||||
!!! error TS2345: Signature '(s: string): { a: number; b: number; }' has no corresponding signature in '(s: string) => {}'
|
||||
!!! error TS2345: Type '{}' is not assignable to type '{ a: number; b: number; }'.
|
||||
!!! error TS2345: Property 'a' is missing in type '{}'.
|
||||
!!! error TS2345: Type '{}' is not assignable to type '{ a: number; b: number; }'.
|
||||
!!! error TS2345: Property 'a' is missing in type '{}'.
|
||||
func(s => ({ a: blah, b: 3 })); // Only error inside the function, but not outside (since it would be applicable if not for the provisional error)
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'blah'.
|
||||
func(s => ({ a: blah })); // Two errors here, one for blah not being defined, and one for the overload since it would not be applicable anyway
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(s: string) => { a: any; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'.
|
||||
!!! error TS2345: Signature '(s: string): { a: number; b: number; }' has no corresponding signature in '(s: string) => { a: any; }'
|
||||
!!! error TS2345: Type '{ a: any; }' is not assignable to type '{ a: number; b: number; }'.
|
||||
!!! error TS2345: Property 'b' is missing in type '{ a: any; }'.
|
||||
!!! error TS2345: Type '{ a: any; }' is not assignable to type '{ a: number; b: number; }'.
|
||||
!!! error TS2345: Property 'b' is missing in type '{ a: any; }'.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'blah'.
|
||||
@@ -1,7 +1,5 @@
|
||||
tests/cases/compiler/parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '(s: string) => void'
|
||||
tests/cases/compiler/parseTypes.ts(10,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '(s: string) => void'
|
||||
tests/cases/compiler/parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'.
|
||||
Index signature is missing in type '(s: string) => void'.
|
||||
tests/cases/compiler/parseTypes.ts(12,1): error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'.
|
||||
@@ -20,11 +18,9 @@ tests/cases/compiler/parseTypes.ts(12,1): error TS2322: Type '(s: string) => voi
|
||||
y=g;
|
||||
~
|
||||
!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '(s: string) => void'
|
||||
x=g;
|
||||
~
|
||||
!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '(s: string) => void'
|
||||
w=g;
|
||||
~
|
||||
!!! error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'.
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser536727.ts(7,5): error TS2345: Argument of type '() => (x: string) => string' is not assignable to parameter of type '(x: string) => string'.
|
||||
Signature '(x: string): string' has no corresponding signature in '() => (x: string) => string'
|
||||
Type '(x: string) => string' is not assignable to type 'string'.
|
||||
Type '(x: string) => string' is not assignable to type 'string'.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser536727.ts(8,5): error TS2345: Argument of type '() => (x: string) => string' is not assignable to parameter of type '(x: string) => string'.
|
||||
Signature '(x: string): string' has no corresponding signature in '() => (x: string) => string'
|
||||
Type '(x: string) => string' is not assignable to type 'string'.
|
||||
Type '(x: string) => string' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser536727.ts (2 errors) ====
|
||||
@@ -16,11 +14,9 @@ tests/cases/conformance/parser/ecmascript5/RegressionTests/parser536727.ts(8,5):
|
||||
foo(() => g);
|
||||
~~~~~~~
|
||||
!!! error TS2345: Argument of type '() => (x: string) => string' is not assignable to parameter of type '(x: string) => string'.
|
||||
!!! error TS2345: Signature '(x: string): string' has no corresponding signature in '() => (x: string) => string'
|
||||
!!! error TS2345: Type '(x: string) => string' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type '(x: string) => string' is not assignable to type 'string'.
|
||||
foo(x);
|
||||
~
|
||||
!!! error TS2345: Argument of type '() => (x: string) => string' is not assignable to parameter of type '(x: string) => string'.
|
||||
!!! error TS2345: Signature '(x: string): string' has no corresponding signature in '() => (x: string) => string'
|
||||
!!! error TS2345: Type '(x: string) => string' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type '(x: string) => string' is not assignable to type 'string'.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
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'.
|
||||
Signature '(x: S): Function' has no corresponding signature in '(x: S) => string'
|
||||
Type 'string' is not assignable to type 'Function'.
|
||||
Property 'apply' is missing in type 'String'.
|
||||
Type 'string' is not assignable to type 'Function'.
|
||||
Property 'apply' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/promiseChaining1.ts (1 errors) ====
|
||||
@@ -14,9 +13,8 @@ tests/cases/compiler/promiseChaining1.ts(7,50): error TS2345: Argument of type '
|
||||
var z = this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then(x => x.length)/*number*/; // Should error on "abc" because it is not a Function
|
||||
~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'.
|
||||
!!! error TS2345: Signature '(x: S): Function' has no corresponding signature in '(x: S) => string'
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Function'.
|
||||
!!! error TS2345: Property 'apply' is missing in type 'String'.
|
||||
!!! 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/promiseChaining2.ts(7,45): error TS2345: Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'.
|
||||
Signature '(x: S): Function' has no corresponding signature in '(x: S) => string'
|
||||
Type 'string' is not assignable to type 'Function'.
|
||||
Property 'apply' is missing in type 'String'.
|
||||
Type 'string' is not assignable to type 'Function'.
|
||||
Property 'apply' is missing in type 'String'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/promiseChaining2.ts (1 errors) ====
|
||||
@@ -14,9 +13,8 @@ tests/cases/compiler/promiseChaining2.ts(7,45): error TS2345: Argument of type '
|
||||
var z = this.then(x => result).then(x => "abc").then(x => x.length);
|
||||
~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'.
|
||||
!!! error TS2345: Signature '(x: S): Function' has no corresponding signature in '(x: S) => string'
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Function'.
|
||||
!!! error TS2345: Property 'apply' is missing in type 'String'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'Function'.
|
||||
!!! error TS2345: Property 'apply' is missing in type 'String'.
|
||||
return new Chain2(result);
|
||||
}
|
||||
}
|
||||
@@ -1,75 +1,50 @@
|
||||
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>'.
|
||||
Signature '(value: IPromise<number>): IPromise<number>' has no corresponding signature in '(x: 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'.
|
||||
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>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(82,19): error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(83,19): error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(84,19): error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(88,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations.ts(91,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations.ts(92,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations.ts(93,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations.ts(97,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations.ts(100,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations.ts(101,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations.ts(102,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations.ts(106,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(109,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(110,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(111,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(117,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations.ts(120,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations.ts(121,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations.ts(122,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations.ts(126,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations.ts(129,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations.ts(132,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations.ts(133,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations.ts(134,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations.ts(137,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
@@ -80,35 +55,27 @@ tests/cases/compiler/promisePermutations.ts(152,12): error TS2453: The type argu
|
||||
Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }' is not assignable to type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'.
|
||||
Signature '<U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>' has no corresponding signature in '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => Promise<any>'.
|
||||
Signature '(value: number): Promise<any>' has no corresponding signature in '(value: string) => IPromise<any>'
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => Promise<any>'.
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations.ts(156,21): error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(158,21): error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(159,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
Signature '(value: number): Promise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }' is not assignable to type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'.
|
||||
Signature '<U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>' has no corresponding signature in '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
Signature '(value: string): IPromise<any>' has no corresponding signature in '(value: number) => Promise<any>'
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }' is not assignable to type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'.
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/promisePermutations.ts (33 errors) ====
|
||||
@@ -188,10 +155,9 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
|
||||
var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: IPromise<number>): IPromise<number>' has no corresponding signature in '(x: 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'.
|
||||
!!! 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>;
|
||||
@@ -199,100 +165,84 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
|
||||
var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var r4b = r4.then(sIPromise, testFunction4, testFunction4).then(sIPromise, testFunction4, testFunction4); // ok
|
||||
var s4: Promise<string>;
|
||||
var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s4d = s4.then(sIPromise, testFunction4P, testFunction4).then(sIPromise, testFunction4P, testFunction4);
|
||||
|
||||
var r5: IPromise<string>;
|
||||
var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
var r5b = r5.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s5: Promise<string>;
|
||||
var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
var s5d = s5.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r6: IPromise<string>;
|
||||
var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
var r6b = r6.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s6: Promise<string>;
|
||||
var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
var s6d = s6.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r7: IPromise<string>;
|
||||
var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var r7b = r7.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s7: Promise<string>;
|
||||
var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var s7d = r7.then(sPromise, sPromise, sPromise).then(sPromise, sPromise, sPromise); // ok?
|
||||
|
||||
var r8: IPromise<number>;
|
||||
@@ -301,28 +251,23 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
|
||||
var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
var r8b = r8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok
|
||||
var s8: Promise<number>;
|
||||
var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
var s8d = s8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok
|
||||
|
||||
var r9: IPromise<number>;
|
||||
var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
var r9b = r9.then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok
|
||||
var r9d = r9.then(testFunction, sIPromise, nIPromise); // ok
|
||||
@@ -335,15 +280,12 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
|
||||
var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
var s9d = s9.then(sPromise, sPromise, sPromise); // ok
|
||||
var s9e = s9.then(nPromise, nPromise, nPromise); // ok
|
||||
var s9f = s9.then(testFunction, sIPromise, nIPromise); // error
|
||||
@@ -375,47 +317,39 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
|
||||
!!! error TS2453: Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
!!! error TS2453: Types of property 'then' are incompatible.
|
||||
!!! error TS2453: Type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }' is not assignable to type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'.
|
||||
!!! error TS2453: Signature '<U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>' has no corresponding signature in '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'
|
||||
!!! error TS2453: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2453: Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => Promise<any>'.
|
||||
!!! error TS2453: Signature '(value: number): Promise<any>' has no corresponding signature in '(value: string) => IPromise<any>'
|
||||
!!! error TS2453: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2453: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2453: Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => Promise<any>'.
|
||||
!!! error TS2453: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r11: IPromise<number>;
|
||||
var r11a = r11.then(testFunction11, testFunction11, testFunction11); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11: Promise<number>;
|
||||
var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): Promise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Types of property 'then' are incompatible.
|
||||
!!! error TS2345: Type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }' is not assignable to type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'.
|
||||
!!! error TS2345: Signature '<U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>' has no corresponding signature in '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'
|
||||
!!! error TS2345: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2345: Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<any>' has no corresponding signature in '(value: number) => Promise<any>'
|
||||
!!! error TS2345: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Types of property 'then' are incompatible.
|
||||
!!! error TS2345: Type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }' is not assignable to type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'.
|
||||
!!! error TS2345: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2345: Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
!!! error TS2345: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
var r12 = testFunction12(x => x);
|
||||
var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
|
||||
@@ -1,75 +1,50 @@
|
||||
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>'.
|
||||
Signature '(value: IPromise<number>): IPromise<number>' has no corresponding signature in '(x: 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'.
|
||||
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>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(81,19): error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(82,19): error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(83,19): error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(87,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations2.ts(90,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations2.ts(91,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations2.ts(92,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations2.ts(96,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations2.ts(99,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations2.ts(100,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations2.ts(101,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations2.ts(105,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(108,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(109,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(110,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(116,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations2.ts(119,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations2.ts(120,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations2.ts(121,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations2.ts(125,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations2.ts(128,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations2.ts(131,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations2.ts(132,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations2.ts(133,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations2.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
@@ -80,35 +55,27 @@ tests/cases/compiler/promisePermutations2.ts(151,12): error TS2453: The type arg
|
||||
Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }' is not assignable to type '<U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => Promise<U>'.
|
||||
Signature '<U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>' has no corresponding signature in '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => any'.
|
||||
Signature '(value: number): any' has no corresponding signature in '(value: string) => IPromise<any>'
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => any'.
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations2.ts(155,21): error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(157,21): error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(158,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
Signature '(value: number): Promise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '<U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => Promise<U>' is not assignable to type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'.
|
||||
Signature '<U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>' has no corresponding signature in '<U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => Promise<U>'
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: number) => any' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
Signature '(value: string): IPromise<any>' has no corresponding signature in '(value: number) => any'
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '<U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => Promise<U>' is not assignable to type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'.
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: number) => any' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/promisePermutations2.ts (33 errors) ====
|
||||
@@ -187,10 +154,9 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
|
||||
var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); // Should error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: IPromise<number>): IPromise<number>' has no corresponding signature in '(x: 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'.
|
||||
!!! 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>;
|
||||
@@ -198,100 +164,84 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
|
||||
var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var r4b = r4.then(sIPromise, testFunction4, testFunction4).then(sIPromise, testFunction4, testFunction4); // ok
|
||||
var s4: Promise<string>;
|
||||
var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s4d = s4.then(sIPromise, testFunction4P, testFunction4).then(sIPromise, testFunction4P, testFunction4);
|
||||
|
||||
var r5: IPromise<string>;
|
||||
var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
var r5b = r5.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s5: Promise<string>;
|
||||
var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
var s5d = s5.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r6: IPromise<string>;
|
||||
var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
var r6b = r6.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s6: Promise<string>;
|
||||
var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
var s6d = s6.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r7: IPromise<string>;
|
||||
var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var r7b = r7.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s7: Promise<string>;
|
||||
var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var s7d = r7.then(sPromise, sPromise, sPromise).then(sPromise, sPromise, sPromise); // ok?
|
||||
|
||||
var r8: IPromise<number>;
|
||||
@@ -300,28 +250,23 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
|
||||
var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
var r8b = r8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok
|
||||
var s8: Promise<number>;
|
||||
var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
var s8d = s8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok
|
||||
|
||||
var r9: IPromise<number>;
|
||||
var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
var r9b = r9.then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok
|
||||
var r9d = r9.then(testFunction, sIPromise, nIPromise); // error
|
||||
@@ -334,15 +279,12 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
|
||||
var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
var s9d = s9.then(sPromise, sPromise, sPromise); // ok
|
||||
var s9e = s9.then(nPromise, nPromise, nPromise); // ok
|
||||
var s9f = s9.then(testFunction, sIPromise, nIPromise); // error
|
||||
@@ -374,47 +316,39 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
|
||||
!!! error TS2453: Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
!!! error TS2453: Types of property 'then' are incompatible.
|
||||
!!! error TS2453: Type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }' is not assignable to type '<U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => Promise<U>'.
|
||||
!!! error TS2453: Signature '<U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>' has no corresponding signature in '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'
|
||||
!!! error TS2453: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2453: Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => any'.
|
||||
!!! error TS2453: Signature '(value: number): any' has no corresponding signature in '(value: string) => IPromise<any>'
|
||||
!!! error TS2453: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2453: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2453: Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => any'.
|
||||
!!! error TS2453: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r11: IPromise<number>;
|
||||
var r11a = r11.then(testFunction11, testFunction11, testFunction11); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11: Promise<number>;
|
||||
var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // ok
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): Promise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // ok
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Types of property 'then' are incompatible.
|
||||
!!! error TS2345: Type '<U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => Promise<U>' is not assignable to type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'.
|
||||
!!! error TS2345: Signature '<U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>' has no corresponding signature in '<U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => Promise<U>'
|
||||
!!! error TS2345: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2345: Type '(value: number) => any' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<any>' has no corresponding signature in '(value: number) => any'
|
||||
!!! error TS2345: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Types of property 'then' are incompatible.
|
||||
!!! error TS2345: Type '<U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void) => Promise<U>' is not assignable to type '{ <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }'.
|
||||
!!! error TS2345: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2345: Type '(value: number) => any' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
!!! error TS2345: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
var r12 = testFunction12(x => x);
|
||||
var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
|
||||
@@ -1,79 +1,53 @@
|
||||
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>'.
|
||||
Signature '(value: IPromise<number>): IPromise<number>' has no corresponding signature in '(x: 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'.
|
||||
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>'.
|
||||
Signature '(value: IPromise<number>): IPromise<number>' has no corresponding signature in '(x: number) => IPromise<number>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'IPromise<number>'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'IPromise<number>'.
|
||||
tests/cases/compiler/promisePermutations3.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>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(81,19): error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(82,19): error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(83,19): error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Types of parameters 'x' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(87,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations3.ts(90,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations3.ts(91,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations3.ts(92,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations3.ts(96,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations3.ts(99,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
tests/cases/compiler/promisePermutations3.ts(100,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations3.ts(101,19): error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
tests/cases/compiler/promisePermutations3.ts(105,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(108,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(109,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
Signature '(value: string): Promise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(110,19): error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
Types of parameters 'cb' and 'value' are incompatible.
|
||||
Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(116,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations3.ts(119,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations3.ts(120,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations3.ts(121,19): error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations3.ts(125,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations3.ts(128,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations3.ts(131,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
tests/cases/compiler/promisePermutations3.ts(132,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations3.ts(133,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
tests/cases/compiler/promisePermutations3.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
@@ -84,42 +58,32 @@ tests/cases/compiler/promisePermutations3.ts(151,12): error TS2453: The type arg
|
||||
Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>' is not assignable to type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'.
|
||||
Signature '<U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>' has no corresponding signature in '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>'
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: string) => any' is not assignable to type '(value: number) => Promise<any>'.
|
||||
Signature '(value: number): Promise<any>' has no corresponding signature in '(value: string) => any'
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: string) => any' is not assignable to type '(value: number) => Promise<any>'.
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/compiler/promisePermutations3.ts(155,21): error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(157,21): error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(158,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
Signature '(value: number): Promise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(159,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }' is not assignable to type '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>'.
|
||||
Signature '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>' has no corresponding signature in '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => any'.
|
||||
Signature '(value: string): any' has no corresponding signature in '(value: number) => Promise<any>'
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }' is not assignable to type '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>'.
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => any'.
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of type '{ <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise<any>'.
|
||||
Signature '(value: (x: any) => any): Promise<any>' has no corresponding signature in '{ <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }'
|
||||
Type 'IPromise<any>' is not assignable to type 'Promise<any>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '<U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>' is not assignable to type '{ <U>(success?: (value: any) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'.
|
||||
Signature '<U>(success?: (value: any) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>' has no corresponding signature in '<U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>'
|
||||
Type 'IPromise<any>' is not assignable to type 'Promise<any>'.
|
||||
Type 'IPromise<any>' is not assignable to type 'Promise<any>'.
|
||||
Types of property 'then' are incompatible.
|
||||
Type '<U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>' is not assignable to type '{ <U>(success?: (value: any) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'.
|
||||
Type 'IPromise<any>' is not assignable to type 'Promise<any>'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/promisePermutations3.ts (35 errors) ====
|
||||
@@ -193,10 +157,9 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
||||
var r3b = r3.then(testFunction3, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3);
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: IPromise<number>): IPromise<number>' has no corresponding signature in '(x: 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'.
|
||||
!!! 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);
|
||||
@@ -204,9 +167,8 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
||||
var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3);
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: IPromise<number>): IPromise<number>' has no corresponding signature in '(x: 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: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'IPromise<number>'.
|
||||
|
||||
var r4: IPromise<string>;
|
||||
var sIPromise: (x: any) => IPromise<string>;
|
||||
@@ -214,100 +176,84 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
||||
var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var r4b = r4.then(sIPromise, testFunction4, testFunction4).then(sIPromise, testFunction4, testFunction4); // ok
|
||||
var s4: Promise<string>;
|
||||
var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, y?: string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, y?: string) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s4d = s4.then(sIPromise, testFunction4P, testFunction4).then(sIPromise, testFunction4P, testFunction4);
|
||||
|
||||
var r5: IPromise<string>;
|
||||
var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
var r5b = r5.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s5: Promise<string>;
|
||||
var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => IPromise<string>'
|
||||
var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: (a: string) => string) => Promise<string>'
|
||||
var s5d = s5.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r6: IPromise<string>;
|
||||
var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
var r6b = r6.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s6: Promise<string>;
|
||||
var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => IPromise<string>'
|
||||
var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number, cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(x: number, cb: <T>(a: T) => T) => Promise<string>'
|
||||
var s6d = s6.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r7: IPromise<string>;
|
||||
var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var r7b = r7.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var s7: Promise<string>;
|
||||
var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => IPromise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): Promise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(cb: <T>(a: T) => T) => Promise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: string): IPromise<string>' has no corresponding signature in '(cb: <T>(a: T) => T) => Promise<string>'
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
!!! error TS2345: Types of parameters 'cb' and 'value' are incompatible.
|
||||
!!! error TS2345: Type '<T>(a: T) => T' is not assignable to type 'string'.
|
||||
var s7d = r7.then(sPromise, sPromise, sPromise).then(sPromise, sPromise, sPromise); // ok?
|
||||
|
||||
var r8: IPromise<number>;
|
||||
@@ -316,28 +262,23 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
||||
var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
var r8b = r8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok
|
||||
var s8: Promise<number>;
|
||||
var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => IPromise<T>'
|
||||
var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: (a: T) => T) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: (a: T) => T) => Promise<T>'
|
||||
var s8d = s8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok
|
||||
|
||||
var r9: IPromise<number>;
|
||||
var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
var r9b = r9.then(sIPromise, sIPromise, sIPromise); // ok
|
||||
var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok
|
||||
var r9d = r9.then(testFunction, sIPromise, nIPromise); // error
|
||||
@@ -350,15 +291,12 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
||||
var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>' is not assignable to parameter of type '(value: number) => IPromise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => IPromise<T>'
|
||||
var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => Promise<number>'.
|
||||
!!! error TS2345: Signature '(value: number): Promise<number>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<any>' has no corresponding signature in '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>'
|
||||
var s9d = s9.then(sPromise, sPromise, sPromise); // ok
|
||||
var s9e = s9.then(nPromise, nPromise, nPromise); // ok
|
||||
var s9f = s9.then(testFunction, sIPromise, nIPromise); // error
|
||||
@@ -390,47 +328,39 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
||||
!!! error TS2453: Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
|
||||
!!! error TS2453: Types of property 'then' are incompatible.
|
||||
!!! error TS2453: Type '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>' is not assignable to type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'.
|
||||
!!! error TS2453: Signature '<U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>' has no corresponding signature in '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>'
|
||||
!!! error TS2453: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2453: Type '(value: string) => any' is not assignable to type '(value: number) => Promise<any>'.
|
||||
!!! error TS2453: Signature '(value: number): Promise<any>' has no corresponding signature in '(value: string) => any'
|
||||
!!! error TS2453: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2453: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2453: Type '(value: string) => any' is not assignable to type '(value: number) => Promise<any>'.
|
||||
!!! error TS2453: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2453: Type 'string' is not assignable to type 'number'.
|
||||
var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok
|
||||
|
||||
var r11: IPromise<number>;
|
||||
var r11a = r11.then(testFunction11, testFunction11, testFunction11); // ok
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11: Promise<number>;
|
||||
var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }'
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): Promise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'Promise<string>'.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
|
||||
!!! error TS2345: Signature '(value: number): IPromise<string>' has no corresponding signature in '{ (x: number): Promise<number>; (x: string): Promise<string>; }'
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Types of property 'then' are incompatible.
|
||||
!!! error TS2345: Type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }' is not assignable to type '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>'.
|
||||
!!! error TS2345: Signature '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>' has no corresponding signature in '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'
|
||||
!!! error TS2345: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2345: Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => any'.
|
||||
!!! error TS2345: Signature '(value: string): any' has no corresponding signature in '(value: number) => Promise<any>'
|
||||
!!! error TS2345: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
!!! error TS2345: Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
|
||||
!!! error TS2345: Types of property 'then' are incompatible.
|
||||
!!! error TS2345: Type '{ <U>(success?: (value: number) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }' is not assignable to type '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>'.
|
||||
!!! error TS2345: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2345: Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => any'.
|
||||
!!! error TS2345: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
var r12 = testFunction12(x => x);
|
||||
var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
@@ -439,10 +369,8 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
||||
var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise<any>'.
|
||||
!!! error TS2345: Signature '(value: (x: any) => any): Promise<any>' has no corresponding signature in '{ <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }'
|
||||
!!! error TS2345: Type 'IPromise<any>' is not assignable to type 'Promise<any>'.
|
||||
!!! error TS2345: Types of property 'then' are incompatible.
|
||||
!!! error TS2345: Type '<U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>' is not assignable to type '{ <U>(success?: (value: any) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'.
|
||||
!!! error TS2345: Signature '<U>(success?: (value: any) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>' has no corresponding signature in '<U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>'
|
||||
!!! error TS2345: Type 'IPromise<any>' is not assignable to type 'Promise<any>'.
|
||||
!!! error TS2345: Type 'IPromise<any>' is not assignable to type 'Promise<any>'.
|
||||
!!! error TS2345: Types of property 'then' are incompatible.
|
||||
!!! error TS2345: Type '<U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>' is not assignable to type '{ <U>(success?: (value: any) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'.
|
||||
!!! error TS2345: Type 'IPromise<any>' is not assignable to type 'Promise<any>'.
|
||||
var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok
|
||||
@@ -2,8 +2,7 @@ tests/cases/compiler/recursiveFunctionTypes.ts(1,35): error TS2322: Type 'number
|
||||
Signature '(): () => typeof fn' has no corresponding signature in 'Number'
|
||||
tests/cases/compiler/recursiveFunctionTypes.ts(3,5): error TS2322: Type '() => typeof fn' is not assignable to type 'number'.
|
||||
tests/cases/compiler/recursiveFunctionTypes.ts(4,5): error TS2322: Type '() => typeof fn' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '() => typeof fn'
|
||||
Type '() => typeof fn' is not assignable to type 'number'.
|
||||
Type '() => typeof fn' is not assignable to type 'number'.
|
||||
tests/cases/compiler/recursiveFunctionTypes.ts(11,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.
|
||||
tests/cases/compiler/recursiveFunctionTypes.ts(12,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.
|
||||
tests/cases/compiler/recursiveFunctionTypes.ts(17,5): error TS2322: Type '() => I<typeof f3>' is not assignable to type 'number'.
|
||||
@@ -32,8 +31,7 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,4): error TS2345: Argument of
|
||||
var y: () => number = fn; // ok
|
||||
~
|
||||
!!! error TS2322: Type '() => typeof fn' is not assignable to type '() => number'.
|
||||
!!! error TS2322: Signature '(): number' has no corresponding signature in '() => typeof fn'
|
||||
!!! error TS2322: Type '() => typeof fn' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type '() => typeof fn' is not assignable to type 'number'.
|
||||
|
||||
var f: () => typeof g;
|
||||
var g: () => typeof f;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
tests/cases/compiler/requiredInitializedParameter2.ts(5,7): error TS2420: Class 'C1' incorrectly implements interface 'I1'.
|
||||
Types of property 'method' are incompatible.
|
||||
Type '(a: number, b: any) => void' is not assignable to type '() => any'.
|
||||
Signature '(): any' has no corresponding signature in '(a: number, b: any) => void'
|
||||
|
||||
|
||||
==== tests/cases/compiler/requiredInitializedParameter2.ts (1 errors) ====
|
||||
@@ -14,6 +13,5 @@ tests/cases/compiler/requiredInitializedParameter2.ts(5,7): error TS2420: Class
|
||||
!!! error TS2420: Class 'C1' incorrectly implements interface 'I1'.
|
||||
!!! error TS2420: Types of property 'method' are incompatible.
|
||||
!!! error TS2420: Type '(a: number, b: any) => void' is not assignable to type '() => any'.
|
||||
!!! error TS2420: Signature '(): any' has no corresponding signature in '(a: number, b: any) => void'
|
||||
method(a = 0, b) { }
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
tests/cases/compiler/restArgAssignmentCompat.ts(7,1): error TS2322: Type '(...x: number[]) => void' is not assignable to type '(x: number[], y: string) => void'.
|
||||
Signature '(x: number[], y: string): void' has no corresponding signature in '(...x: number[]) => void'
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'number' is not assignable to type 'number[]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
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) ====
|
||||
@@ -15,9 +14,8 @@ tests/cases/compiler/restArgAssignmentCompat.ts(7,1): error TS2322: Type '(...x:
|
||||
n = f;
|
||||
~
|
||||
!!! error TS2322: Type '(...x: number[]) => void' is not assignable to type '(x: number[], y: string) => void'.
|
||||
!!! error TS2322: Signature '(x: number[], y: string): void' has no corresponding signature in '(...x: number[]) => 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'.
|
||||
!!! 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');
|
||||
|
||||
+2
-4
@@ -1,6 +1,5 @@
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticMemberAssignsToConstructorFunctionMembers.ts(7,9): error TS2322: Type '() => void' is not assignable to type '(x: number) => number'.
|
||||
Signature '(x: number): number' has no corresponding signature in '() => void'
|
||||
Type 'void' is not assignable to type 'number'.
|
||||
Type 'void' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticMemberAssignsToConstructorFunctionMembers.ts (1 errors) ====
|
||||
@@ -13,8 +12,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara
|
||||
C.bar = () => { } // error
|
||||
~~~~~
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2322: Signature '(x: number): number' has no corresponding signature in '() => void'
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'number'.
|
||||
!!! error TS2322: Type 'void' is not assignable to type 'number'.
|
||||
C.bar = (x) => x; // ok
|
||||
C.bar = (x: number) => 1; // ok
|
||||
return 1;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.ts(6,13): error TS2345: Argument of type '(y: "foo" | "bar") => string' is not assignable to parameter of type '(x: "foo") => "foo"'.
|
||||
Signature '(x: "foo"): "foo"' has no corresponding signature in '(y: "foo" | "bar") => string'
|
||||
Type 'string' is not assignable to type '"foo"'.
|
||||
Type 'string' is not assignable to type '"foo"'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.ts (1 errors) ====
|
||||
@@ -12,6 +11,5 @@ tests/cases/conformance/types/stringLiteral/stringLiteralTypesAsTypeParameterCon
|
||||
let f = foo((y: "foo" | "bar") => y === "foo" ? y : "foo");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(y: "foo" | "bar") => string' is not assignable to parameter of type '(x: "foo") => "foo"'.
|
||||
!!! error TS2345: Signature '(x: "foo"): "foo"' has no corresponding signature in '(y: "foo" | "bar") => string'
|
||||
!!! error TS2345: Type 'string' is not assignable to type '"foo"'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type '"foo"'.
|
||||
let fResult = f("foo");
|
||||
@@ -1,6 +1,5 @@
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesA.ts(2,15): error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => number'.
|
||||
Signature '(x: number): number' has no corresponding signature in '(x: number) => string'
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesA.ts (1 errors) ====
|
||||
@@ -8,5 +7,4 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
var r5 = foo3((x: number) => ''); // error
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => number'.
|
||||
!!! error TS2345: Signature '(x: number): number' has no corresponding signature in '(x: number) => string'
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
@@ -1,11 +1,9 @@
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts(19,11): error TS2430: Interface 'I3' incorrectly extends interface 'Base'.
|
||||
Types of property 'a' are incompatible.
|
||||
Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
Signature '(): number' has no corresponding signature in '(x: number) => number'
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts(49,11): error TS2430: Interface 'I10' incorrectly extends interface 'Base'.
|
||||
Types of property 'a3' are incompatible.
|
||||
Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
Signature '(x: number): number' has no corresponding signature in '(x: number, y: number) => number'
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithOptionalParameters.ts (2 errors) ====
|
||||
@@ -32,7 +30,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base'.
|
||||
!!! error TS2430: Types of property 'a' are incompatible.
|
||||
!!! error TS2430: Type '(x: number) => number' is not assignable to type '() => number'.
|
||||
!!! error TS2430: Signature '(): number' has no corresponding signature in '(x: number) => number'
|
||||
a: (x: number) => number; // error, too many required params
|
||||
}
|
||||
|
||||
@@ -67,7 +64,6 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base'.
|
||||
!!! error TS2430: Types of property 'a3' are incompatible.
|
||||
!!! error TS2430: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'.
|
||||
!!! error TS2430: Signature '(x: number): number' has no corresponding signature in '(x: number, y: number) => number'
|
||||
a3: (x: number, y: number) => number; // error, too many required params
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user