mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-07 17:29:36 -05:00
Accept new baselines
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
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; }'.
|
||||
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: {}) => string; }'.
|
||||
Types of property 'cb' are incompatible.
|
||||
Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: any) => string'.
|
||||
Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (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'.
|
||||
@@ -19,9 +19,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithCon
|
||||
var arg2: { cb: new <T>(x: T, y: T) => string };
|
||||
var r2 = foo(arg2); // error
|
||||
~~~~
|
||||
!!! 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: Argument of type '{ cb: new <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: {}) => 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: Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: {}) => string'.
|
||||
var arg3: { cb: new (x: string, y: number) => string };
|
||||
var r3 = foo(arg3); // error
|
||||
~~~~
|
||||
|
||||
@@ -53,8 +53,8 @@ var a: {
|
||||
}
|
||||
|
||||
var r = foo(i); // any
|
||||
>r : any
|
||||
>foo(i) : any
|
||||
>r : {}
|
||||
>foo(i) : {}
|
||||
>foo : <T>(x: new (a: T) => T) => T
|
||||
>i : I
|
||||
|
||||
@@ -71,8 +71,8 @@ var r3 = foo(i2); // string
|
||||
>i2 : I2<string>
|
||||
|
||||
var r3b = foo(a); // any
|
||||
>r3b : any
|
||||
>foo(a) : any
|
||||
>r3b : {}
|
||||
>foo(a) : {}
|
||||
>foo : <T>(x: new (a: T) => T) => T
|
||||
>a : new <T>(x: T) => T
|
||||
|
||||
@@ -101,15 +101,15 @@ var r4 = foo2(1, i2); // error
|
||||
>i2 : I2<string>
|
||||
|
||||
var r4b = foo2(1, a); // any
|
||||
>r4b : any
|
||||
>foo2(1, a) : any
|
||||
>r4b : {}
|
||||
>foo2(1, a) : {}
|
||||
>foo2 : <T, U>(x: T, cb: new (a: T) => U) => U
|
||||
>1 : 1
|
||||
>a : new <T>(x: T) => T
|
||||
|
||||
var r5 = foo2(1, i); // any
|
||||
>r5 : any
|
||||
>foo2(1, i) : any
|
||||
>r5 : {}
|
||||
>foo2(1, i) : {}
|
||||
>foo2 : <T, U>(x: T, cb: new (a: T) => U) => U
|
||||
>1 : 1
|
||||
>i : I
|
||||
@@ -141,16 +141,16 @@ function foo3<T, U>(x: T, cb: new(a: T) => U, y: U) {
|
||||
}
|
||||
|
||||
var r7 = foo3(null, i, ''); // any
|
||||
>r7 : any
|
||||
>foo3(null, i, '') : any
|
||||
>r7 : {}
|
||||
>foo3(null, i, '') : {}
|
||||
>foo3 : <T, U>(x: T, cb: new (a: T) => U, y: U) => U
|
||||
>null : null
|
||||
>i : I
|
||||
>'' : ""
|
||||
|
||||
var r7b = foo3(null, a, ''); // any
|
||||
>r7b : any
|
||||
>foo3(null, a, '') : any
|
||||
>r7b : {}
|
||||
>foo3(null, a, '') : {}
|
||||
>foo3 : <T, U>(x: T, cb: new (a: T) => U, y: U) => U
|
||||
>null : null
|
||||
>a : new <T>(x: T) => T
|
||||
|
||||
@@ -87,8 +87,8 @@ module GenericParameter {
|
||||
>T : T
|
||||
|
||||
var r7 = foo5(b); // new any => string; new(x:number) => any
|
||||
>r7 : { new (x: any): string; new (x: number): any; }
|
||||
>foo5(b) : { new (x: any): string; new (x: number): any; }
|
||||
>r7 : { new (x: {}): string; new (x: number): {}; }
|
||||
>foo5(b) : { new (x: {}): string; new (x: number): {}; }
|
||||
>foo5 : <T>(cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; }
|
||||
>b : { new <T>(x: T): string; new <T>(x: number): T; }
|
||||
|
||||
@@ -114,8 +114,8 @@ module GenericParameter {
|
||||
>a : { new (x: boolean): string; new (x: number): boolean; }
|
||||
|
||||
var r9 = foo6(b); // new any => string; new(x:any, y?:any) => string
|
||||
>r9 : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>foo6(b) : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>r9 : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo6(b) : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo6 : <T>(cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
|
||||
>b : { new <T>(x: T): string; new <T>(x: number): T; }
|
||||
|
||||
@@ -137,8 +137,8 @@ module GenericParameter {
|
||||
}
|
||||
|
||||
var r13 = foo7(1, b); // new any => string; new(x:any, y?:any) => string
|
||||
>r13 : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>foo7(1, b) : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>r13 : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo7(1, b) : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
|
||||
>1 : 1
|
||||
>b : { new <T>(x: T): string; new <T>(x: number): T; }
|
||||
@@ -162,15 +162,15 @@ module GenericParameter {
|
||||
>T : T
|
||||
|
||||
var r14 = foo7(1, c); // new any => string; new(x:any, y?:any) => string
|
||||
>r14 : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>foo7(1, c) : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>r14 : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo7(1, c) : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
|
||||
>1 : 1
|
||||
>c : { <T>(x: number): T; new <T>(x: T): string; }
|
||||
|
||||
var r15 = foo7(1, c2); // new any => string; new(x:any, y?:any) => string
|
||||
>r15 : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>foo7(1, c2) : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>r15 : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo7(1, c2) : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
|
||||
>1 : 1
|
||||
>c2 : { new <T>(x: T): string; new <T>(x: number): T; }
|
||||
|
||||
@@ -1,4 +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; }'.
|
||||
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: {}): string; new (x: {}, y?: {}): string; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts (1 errors) ====
|
||||
@@ -34,7 +34,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOve
|
||||
var b: { new <T>(x: T, y: T): string };
|
||||
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: Argument of type 'new <T>(x: T, y: T) => string' is not assignable to parameter of type '{ new (x: {}): string; new (x: {}, y?: {}): string; }'.
|
||||
|
||||
function foo7<T>(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) {
|
||||
return cb;
|
||||
|
||||
@@ -63,8 +63,8 @@ module GenericParameter {
|
||||
>T : T
|
||||
|
||||
var r6 = foo5(a); // ok
|
||||
>r6 : { new (x: any): string; new (x: number): any; }
|
||||
>foo5(a) : { new (x: any): string; new (x: number): any; }
|
||||
>r6 : { new (x: {}): string; new (x: number): {}; }
|
||||
>foo5(a) : { new (x: {}): string; new (x: number): {}; }
|
||||
>foo5 : <T>(cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; }
|
||||
>a : new <T>(x: T) => T
|
||||
|
||||
@@ -115,8 +115,8 @@ module GenericParameter {
|
||||
}
|
||||
|
||||
var r13 = foo7(1, a); // ok
|
||||
>r13 : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>foo7(1, a) : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>r13 : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo7(1, a) : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
|
||||
>1 : 1
|
||||
>a : new <T>(x: T) => T
|
||||
@@ -131,8 +131,8 @@ module GenericParameter {
|
||||
>T : T
|
||||
|
||||
var r14 = foo7(1, c); // ok
|
||||
>r14 : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>foo7(1, c) : { new (x: any): string; new (x: any, y?: any): string; }
|
||||
>r14 : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo7(1, c) : { new (x: {}): string; new (x: {}, y?: {}): string; }
|
||||
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
|
||||
>1 : 1
|
||||
>c : { new <T>(x: T): number; new <T>(x: number): T; }
|
||||
|
||||
@@ -83,8 +83,8 @@ module GenericParameter {
|
||||
>T : T
|
||||
|
||||
var r7 = foo5(a); // any => string (+1 overload)
|
||||
>r7 : { (x: any): string; (x: number): any; }
|
||||
>foo5(a) : { (x: any): string; (x: number): any; }
|
||||
>r7 : { (x: {}): string; (x: number): {}; }
|
||||
>foo5(a) : { (x: {}): string; (x: number): {}; }
|
||||
>foo5 : <T>(cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; }
|
||||
>a : { <T>(x: T): string; <T>(x: number): T; }
|
||||
|
||||
@@ -112,8 +112,8 @@ module GenericParameter {
|
||||
>x : any
|
||||
|
||||
var r9 = foo6(<T>(x: T) => ''); // any => string (+1 overload)
|
||||
>r9 : { (x: any): string; (x: any, y?: any): string; }
|
||||
>foo6(<T>(x: T) => '') : { (x: any): string; (x: any, y?: any): string; }
|
||||
>r9 : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo6(<T>(x: T) => '') : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo6 : <T>(cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
|
||||
><T>(x: T) => '' : <T>(x: T) => string
|
||||
>T : T
|
||||
@@ -122,8 +122,8 @@ module GenericParameter {
|
||||
>'' : ""
|
||||
|
||||
var r11 = foo6(<T>(x: T, y?: T) => ''); // any => string (+1 overload)
|
||||
>r11 : { (x: any): string; (x: any, y?: any): string; }
|
||||
>foo6(<T>(x: T, y?: T) => '') : { (x: any): string; (x: any, y?: any): string; }
|
||||
>r11 : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo6(<T>(x: T, y?: T) => '') : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo6 : <T>(cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
|
||||
><T>(x: T, y?: T) => '' : <T>(x: T, y?: T) => string
|
||||
>T : T
|
||||
@@ -160,8 +160,8 @@ module GenericParameter {
|
||||
>x : any
|
||||
|
||||
var r13 = foo7(1, <T>(x: T) => ''); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]
|
||||
>r13 : { (x: any): string; (x: any, y?: any): string; }
|
||||
>foo7(1, <T>(x: T) => '') : { (x: any): string; (x: any, y?: any): string; }
|
||||
>r13 : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo7(1, <T>(x: T) => '') : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo7 : <T>(x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
|
||||
>1 : 1
|
||||
><T>(x: T) => '' : <T>(x: T) => string
|
||||
@@ -180,8 +180,8 @@ module GenericParameter {
|
||||
>T : T
|
||||
|
||||
var r14 = foo7(1, a); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]
|
||||
>r14 : { (x: any): string; (x: any, y?: any): string; }
|
||||
>foo7(1, a) : { (x: any): string; (x: any, y?: any): string; }
|
||||
>r14 : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo7(1, a) : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo7 : <T>(x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
|
||||
>1 : 1
|
||||
>a : { <T>(x: T): string; <T>(x: number): T; }
|
||||
|
||||
@@ -1,4 +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; }'.
|
||||
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: {}): string; (x: {}, y?: {}): string; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts (1 errors) ====
|
||||
@@ -31,7 +31,7 @@ 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: Argument of type '<T>(x: T, y: T) => string' is not assignable to parameter of type '{ (x: {}): string; (x: {}, y?: {}): string; }'.
|
||||
|
||||
function foo7<T>(x:T, cb: { (x: T): string; (x: T, y?: T): string }) {
|
||||
return cb;
|
||||
|
||||
@@ -55,8 +55,8 @@ module GenericParameter {
|
||||
}
|
||||
|
||||
var r6 = foo5(<T>(x: T) => x); // ok
|
||||
>r6 : { (x: any): string; (x: number): any; }
|
||||
>foo5(<T>(x: T) => x) : { (x: any): string; (x: number): any; }
|
||||
>r6 : { (x: {}): string; (x: number): {}; }
|
||||
>foo5(<T>(x: T) => x) : { (x: {}): string; (x: number): {}; }
|
||||
>foo5 : <T>(cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; }
|
||||
><T>(x: T) => x : <T>(x: T) => T
|
||||
>T : T
|
||||
@@ -109,8 +109,8 @@ module GenericParameter {
|
||||
}
|
||||
|
||||
var r13 = foo7(1, <T>(x: T) => x); // ok
|
||||
>r13 : { (x: any): string; (x: any, y?: any): string; }
|
||||
>foo7(1, <T>(x: T) => x) : { (x: any): string; (x: any, y?: any): string; }
|
||||
>r13 : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo7(1, <T>(x: T) => x) : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo7 : <T>(x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
|
||||
>1 : 1
|
||||
><T>(x: T) => x : <T>(x: T) => T
|
||||
@@ -129,8 +129,8 @@ module GenericParameter {
|
||||
>T : T
|
||||
|
||||
var r14 = foo7(1, a); // ok
|
||||
>r14 : { (x: any): string; (x: any, y?: any): string; }
|
||||
>foo7(1, a) : { (x: any): string; (x: any, y?: any): string; }
|
||||
>r14 : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo7(1, a) : { (x: {}): string; (x: {}, y?: {}): string; }
|
||||
>foo7 : <T>(x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
|
||||
>1 : 1
|
||||
>a : { <T>(x: T): number; <T>(x: number): T; }
|
||||
|
||||
@@ -1396,8 +1396,8 @@ var r12 = testFunction12(x => x);
|
||||
>x : any
|
||||
|
||||
var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
>r12a : IPromise<any>
|
||||
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<any>
|
||||
>r12a : IPromise<{}>
|
||||
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<{}>
|
||||
>r12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
>r12 : IPromise<(x: any) => any>
|
||||
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
@@ -1414,8 +1414,8 @@ var s12 = testFunction12(x => x);
|
||||
>x : any
|
||||
|
||||
var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
>s12a : IPromise<any>
|
||||
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<any>
|
||||
>s12a : IPromise<{}>
|
||||
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<{}>
|
||||
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
>s12 : IPromise<(x: any) => any>
|
||||
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
@@ -1424,8 +1424,8 @@ var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
>testFunction12 : { <T>(x: T): IPromise<T>; <T>(x: T, y: T): IPromise<T>; }
|
||||
|
||||
var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
|
||||
>s12b : IPromise<any>
|
||||
>s12.then(testFunction12P, testFunction12P, testFunction12P) : IPromise<any>
|
||||
>s12b : IPromise<{}>
|
||||
>s12.then(testFunction12P, testFunction12P, testFunction12P) : IPromise<{}>
|
||||
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
>s12 : IPromise<(x: any) => any>
|
||||
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
@@ -1434,8 +1434,8 @@ var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
|
||||
>testFunction12P : { <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }
|
||||
|
||||
var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok
|
||||
>s12c : IPromise<any>
|
||||
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<any>
|
||||
>s12c : IPromise<{}>
|
||||
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<{}>
|
||||
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
>s12 : IPromise<(x: any) => any>
|
||||
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
|
||||
@@ -1349,8 +1349,8 @@ var r12 = testFunction12(x => x);
|
||||
>x : any
|
||||
|
||||
var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
>r12a : IPromise<any>
|
||||
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<any>
|
||||
>r12a : IPromise<{}>
|
||||
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<{}>
|
||||
>r12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
>r12 : IPromise<(x: any) => any>
|
||||
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
@@ -1367,8 +1367,8 @@ var s12 = testFunction12(x => x);
|
||||
>x : any
|
||||
|
||||
var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
>s12a : IPromise<any>
|
||||
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<any>
|
||||
>s12a : IPromise<{}>
|
||||
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<{}>
|
||||
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
>s12 : IPromise<(x: any) => any>
|
||||
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
@@ -1377,8 +1377,8 @@ var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
>testFunction12 : { <T>(x: T): IPromise<T>; <T>(x: T, y: T): IPromise<T>; }
|
||||
|
||||
var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
|
||||
>s12b : IPromise<any>
|
||||
>s12.then(testFunction12P, testFunction12P, testFunction12P) : IPromise<any>
|
||||
>s12b : IPromise<{}>
|
||||
>s12.then(testFunction12P, testFunction12P, testFunction12P) : IPromise<{}>
|
||||
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
>s12 : IPromise<(x: any) => any>
|
||||
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
@@ -1387,8 +1387,8 @@ var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
|
||||
>testFunction12P : { <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }
|
||||
|
||||
var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok
|
||||
>s12c : IPromise<any>
|
||||
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<any>
|
||||
>s12c : IPromise<{}>
|
||||
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<{}>
|
||||
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
>s12 : IPromise<(x: any) => any>
|
||||
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
|
||||
|
||||
@@ -66,8 +66,8 @@ tests/cases/compiler/promisePermutations3.ts(159,21): error TS2345: Argument of
|
||||
Types of parameters 'onfulfilled' and 'success' are incompatible.
|
||||
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>'.
|
||||
Type 'IPromise<any>' is not assignable to type 'Promise<any>'.
|
||||
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<{}>'.
|
||||
Type 'IPromise<any>' is not assignable to type 'Promise<{}>'.
|
||||
Property 'catch' is missing in type 'IPromise<any>'.
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
||||
var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
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: Type 'IPromise<any>' is not assignable to type 'Promise<any>'.
|
||||
!!! 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<{}>'.
|
||||
!!! error TS2345: Type 'IPromise<any>' is not assignable to type 'Promise<{}>'.
|
||||
!!! error TS2345: Property 'catch' is missing in type 'IPromise<any>'.
|
||||
var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok
|
||||
@@ -1349,8 +1349,8 @@ var r12 = testFunction12(x => x);
|
||||
>x : any
|
||||
|
||||
var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
>r12a : IPromise<IPromise<any>>
|
||||
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<IPromise<any>>
|
||||
>r12a : IPromise<IPromise<{}>>
|
||||
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<IPromise<{}>>
|
||||
>r12.then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
|
||||
>r12 : IPromise<(x: any) => any>
|
||||
>then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
|
||||
@@ -1367,8 +1367,8 @@ var s12 = testFunction12(x => x);
|
||||
>x : any
|
||||
|
||||
var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
|
||||
>s12a : IPromise<IPromise<any>>
|
||||
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<IPromise<any>>
|
||||
>s12a : IPromise<IPromise<{}>>
|
||||
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<IPromise<{}>>
|
||||
>s12.then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
|
||||
>s12 : IPromise<(x: any) => any>
|
||||
>then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
|
||||
@@ -1387,8 +1387,8 @@ var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
|
||||
>testFunction12P : { <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }
|
||||
|
||||
var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok
|
||||
>s12c : IPromise<IPromise<any>>
|
||||
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<IPromise<any>>
|
||||
>s12c : IPromise<IPromise<{}>>
|
||||
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<IPromise<{}>>
|
||||
>s12.then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
|
||||
>s12 : IPromise<(x: any) => any>
|
||||
>then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
|
||||
|
||||
Reference in New Issue
Block a user