Accept baselines
This commit is contained in:
parent
765e57b318
commit
3f00197fce
19 changed files with 115 additions and 115 deletions
|
@ -1,22 +1,16 @@
|
|||
error TS2318: Cannot find global type 'Promise'.
|
||||
tests/cases/compiler/asyncFunctionNoReturnType.ts(1,1): error TS2697: An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.
|
||||
tests/cases/compiler/asyncFunctionNoReturnType.ts(1,1): error TS7030: Not all code paths return a value.
|
||||
error TS2468: Cannot find global value 'Promise'.
|
||||
tests/cases/compiler/asyncFunctionNoReturnType.ts(1,1): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
|
||||
tests/cases/compiler/asyncFunctionNoReturnType.ts(2,9): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/compiler/asyncFunctionNoReturnType.ts(3,9): error TS7030: Not all code paths return a value.
|
||||
|
||||
|
||||
!!! error TS2318: Cannot find global type 'Promise'.
|
||||
==== tests/cases/compiler/asyncFunctionNoReturnType.ts (4 errors) ====
|
||||
!!! error TS2468: Cannot find global value 'Promise'.
|
||||
==== tests/cases/compiler/asyncFunctionNoReturnType.ts (2 errors) ====
|
||||
async () => {
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2697: An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS7030: Not all code paths return a value.
|
||||
!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
|
||||
if (window)
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
return;
|
||||
~~~~~~~
|
||||
!!! error TS7030: Not all code paths return a value.
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
tests/cases/compiler/bluebirdStaticThis.ts(5,15): error TS2420: Class 'Promise<R>' incorrectly implements interface 'Thenable<R>'.
|
||||
tests/cases/compiler/bluebirdStaticThis.ts(5,22): error TS2420: Class 'Promise<R>' incorrectly implements interface 'Thenable<R>'.
|
||||
Property 'then' is missing in type 'Promise<R>'.
|
||||
tests/cases/compiler/bluebirdStaticThis.ts(22,51): error TS2694: Namespace 'Promise' has no exported member 'Resolver'.
|
||||
tests/cases/compiler/bluebirdStaticThis.ts(57,109): error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
|
||||
tests/cases/compiler/bluebirdStaticThis.ts(58,91): error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
|
||||
tests/cases/compiler/bluebirdStaticThis.ts(59,91): error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
|
||||
tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
|
||||
tests/cases/compiler/bluebirdStaticThis.ts(22,51): error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Resolver'.
|
||||
tests/cases/compiler/bluebirdStaticThis.ts(57,109): error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'.
|
||||
tests/cases/compiler/bluebirdStaticThis.ts(58,91): error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'.
|
||||
tests/cases/compiler/bluebirdStaticThis.ts(59,91): error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'.
|
||||
tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/bluebirdStaticThis.ts (6 errors) ====
|
||||
|
@ -12,8 +12,8 @@ tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace 'Prom
|
|||
// and all the comments.
|
||||
// Then it adds explicit `this` arguments to the static members.
|
||||
// Tests by: Bart van der Schoor <https://github.com/Bartvds>
|
||||
declare class Promise<R> implements Promise.Thenable<R> {
|
||||
~~~~~~~
|
||||
export declare class Promise<R> implements Promise.Thenable<R> {
|
||||
~~~~~~~
|
||||
!!! error TS2420: Class 'Promise<R>' incorrectly implements interface 'Thenable<R>'.
|
||||
!!! error TS2420: Property 'then' is missing in type 'Promise<R>'.
|
||||
constructor(callback: (resolve: (thenableOrResult: R | Promise.Thenable<R>) => void, reject: (error: any) => void) => void);
|
||||
|
@ -34,7 +34,7 @@ tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace 'Prom
|
|||
|
||||
static defer<R>(dit: typeof Promise): Promise.Resolver<R>;
|
||||
~~~~~~~~
|
||||
!!! error TS2694: Namespace 'Promise' has no exported member 'Resolver'.
|
||||
!!! error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Resolver'.
|
||||
|
||||
static cast<R>(dit: typeof Promise, value: Promise.Thenable<R>): Promise<R>;
|
||||
static cast<R>(dit: typeof Promise, value: R): Promise<R>;
|
||||
|
@ -71,16 +71,16 @@ tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace 'Prom
|
|||
|
||||
static settle<R>(dit: typeof Promise, values: Promise.Thenable<Promise.Thenable<R>[]>): Promise<Promise.Inspection<R>[]>;
|
||||
~~~~~~~~~~
|
||||
!!! error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
|
||||
!!! error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'.
|
||||
static settle<R>(dit: typeof Promise, values: Promise.Thenable<R[]>): Promise<Promise.Inspection<R>[]>;
|
||||
~~~~~~~~~~
|
||||
!!! error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
|
||||
!!! error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'.
|
||||
static settle<R>(dit: typeof Promise, values: Promise.Thenable<R>[]): Promise<Promise.Inspection<R>[]>;
|
||||
~~~~~~~~~~
|
||||
!!! error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
|
||||
!!! error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'.
|
||||
static settle<R>(dit: typeof Promise, values: R[]): Promise<Promise.Inspection<R>[]>;
|
||||
~~~~~~~~~~
|
||||
!!! error TS2694: Namespace 'Promise' has no exported member 'Inspection'.
|
||||
!!! error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'.
|
||||
|
||||
static any<R>(dit: typeof Promise, values: Promise.Thenable<Promise.Thenable<R>[]>): Promise<R>;
|
||||
static any<R>(dit: typeof Promise, values: Promise.Thenable<R[]>): Promise<R>;
|
||||
|
@ -131,7 +131,7 @@ tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace 'Prom
|
|||
static filter<R>(dit: typeof Promise, values: R[], filterer: (item: R, index: number, arrayLength: number) => boolean): Promise<R[]>;
|
||||
}
|
||||
|
||||
declare module Promise {
|
||||
export declare module Promise {
|
||||
export interface Thenable<R> {
|
||||
then<U>(onFulfilled: (value: R) => Thenable<U>, onRejected: (error: any) => Thenable<U>): Thenable<U>;
|
||||
then<U>(onFulfilled: (value: R) => Thenable<U>, onRejected?: (error: any) => U): Thenable<U>;
|
||||
|
@ -141,9 +141,6 @@ tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace 'Prom
|
|||
|
||||
}
|
||||
|
||||
declare module 'bluebird' {
|
||||
export = Promise;
|
||||
}
|
||||
interface Foo {
|
||||
a: number;
|
||||
b: string;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// and all the comments.
|
||||
// Then it adds explicit `this` arguments to the static members.
|
||||
// Tests by: Bart van der Schoor <https://github.com/Bartvds>
|
||||
declare class Promise<R> implements Promise.Thenable<R> {
|
||||
export declare class Promise<R> implements Promise.Thenable<R> {
|
||||
constructor(callback: (resolve: (thenableOrResult: R | Promise.Thenable<R>) => void, reject: (error: any) => void) => void);
|
||||
static try<R>(dit: typeof Promise, fn: () => Promise.Thenable<R>, args?: any[], ctx?: any): Promise<R>;
|
||||
static try<R>(dit: typeof Promise, fn: () => R, args?: any[], ctx?: any): Promise<R>;
|
||||
|
@ -109,7 +109,7 @@ declare class Promise<R> implements Promise.Thenable<R> {
|
|||
static filter<R>(dit: typeof Promise, values: R[], filterer: (item: R, index: number, arrayLength: number) => boolean): Promise<R[]>;
|
||||
}
|
||||
|
||||
declare module Promise {
|
||||
export declare module Promise {
|
||||
export interface Thenable<R> {
|
||||
then<U>(onFulfilled: (value: R) => Thenable<U>, onRejected: (error: any) => Thenable<U>): Thenable<U>;
|
||||
then<U>(onFulfilled: (value: R) => Thenable<U>, onRejected?: (error: any) => U): Thenable<U>;
|
||||
|
@ -119,9 +119,6 @@ declare module Promise {
|
|||
|
||||
}
|
||||
|
||||
declare module 'bluebird' {
|
||||
export = Promise;
|
||||
}
|
||||
interface Foo {
|
||||
a: number;
|
||||
b: string;
|
||||
|
@ -142,6 +139,8 @@ fooProm = Promise.try(Promise, () => {
|
|||
}, arr, x);
|
||||
|
||||
//// [bluebirdStaticThis.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var x;
|
||||
var arr;
|
||||
var foo;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//// [promiseIdentity.ts]
|
||||
interface IPromise<T> {
|
||||
export interface IPromise<T> {
|
||||
then<U>(callback: (x: T) => IPromise<U>): IPromise<U>;
|
||||
}
|
||||
interface Promise<T> {
|
||||
|
@ -22,6 +22,8 @@ var y: IPromise2<string, number>;
|
|||
var y: Promise2<any, string>;
|
||||
|
||||
//// [promiseIdentity.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
var x;
|
||||
var x;
|
||||
// Ok because T in this particular Promise2 is any, as are all the U and W references.
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
=== tests/cases/compiler/promiseIdentity.ts ===
|
||||
interface IPromise<T> {
|
||||
export interface IPromise<T> {
|
||||
>IPromise : Symbol(IPromise, Decl(promiseIdentity.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(promiseIdentity.ts, 0, 19))
|
||||
>T : Symbol(T, Decl(promiseIdentity.ts, 0, 26))
|
||||
|
||||
then<U>(callback: (x: T) => IPromise<U>): IPromise<U>;
|
||||
>then : Symbol(IPromise.then, Decl(promiseIdentity.ts, 0, 23))
|
||||
>then : Symbol(IPromise.then, Decl(promiseIdentity.ts, 0, 30))
|
||||
>U : Symbol(U, Decl(promiseIdentity.ts, 1, 9))
|
||||
>callback : Symbol(callback, Decl(promiseIdentity.ts, 1, 12))
|
||||
>x : Symbol(x, Decl(promiseIdentity.ts, 1, 23))
|
||||
>T : Symbol(T, Decl(promiseIdentity.ts, 0, 19))
|
||||
>T : Symbol(T, Decl(promiseIdentity.ts, 0, 26))
|
||||
>IPromise : Symbol(IPromise, Decl(promiseIdentity.ts, 0, 0))
|
||||
>U : Symbol(U, Decl(promiseIdentity.ts, 1, 9))
|
||||
>IPromise : Symbol(IPromise, Decl(promiseIdentity.ts, 0, 0))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
=== tests/cases/compiler/promiseIdentity.ts ===
|
||||
interface IPromise<T> {
|
||||
export interface IPromise<T> {
|
||||
>IPromise : IPromise<T>
|
||||
>T : T
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@ tests/cases/compiler/promiseIdentity2.ts(11,5): error TS2403: Subsequent variabl
|
|||
|
||||
|
||||
==== tests/cases/compiler/promiseIdentity2.ts (1 errors) ====
|
||||
interface IPromise<T, V> {
|
||||
export interface IPromise<T, V> {
|
||||
then<U, W>(callback: (x: T) => IPromise<U, W>): IPromise<U, W>;
|
||||
}
|
||||
interface Promise<T, V> {
|
||||
export interface Promise<T, V> {
|
||||
then<U, W>(callback: (x: T) => Promise<T, U>): Promise<T, W>;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//// [promiseIdentity2.ts]
|
||||
interface IPromise<T, V> {
|
||||
export interface IPromise<T, V> {
|
||||
then<U, W>(callback: (x: T) => IPromise<U, W>): IPromise<U, W>;
|
||||
}
|
||||
interface Promise<T, V> {
|
||||
export interface Promise<T, V> {
|
||||
then<U, W>(callback: (x: T) => Promise<T, U>): Promise<T, W>;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,8 @@ var x: IPromise<string, number>;
|
|||
var x: Promise<any, string>;
|
||||
|
||||
//// [promiseIdentity2.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
// error because T is string in the first declaration, and T is boolean in the second
|
||||
// Return type and callback return type are ok because T is any in this particular Promise
|
||||
var x;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//// [promiseIdentityWithAny.ts]
|
||||
interface IPromise<T, V> {
|
||||
export interface IPromise<T, V> {
|
||||
then<U, W>(callback: (x: T) => IPromise<U, W>): IPromise<U, W>;
|
||||
}
|
||||
interface Promise<T, V> {
|
||||
export interface Promise<T, V> {
|
||||
then<U, W>(callback: (x: T) => Promise<any, any>): Promise<any, any>;
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,8 @@ var x: IPromise<string, number>;
|
|||
var x: Promise<string, boolean>;
|
||||
|
||||
//// [promiseIdentityWithAny.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
// Should be ok because signature type parameters get erased to any
|
||||
var x;
|
||||
var x;
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
=== tests/cases/compiler/promiseIdentityWithAny.ts ===
|
||||
interface IPromise<T, V> {
|
||||
export interface IPromise<T, V> {
|
||||
>IPromise : Symbol(IPromise, Decl(promiseIdentityWithAny.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithAny.ts, 0, 19))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithAny.ts, 0, 21))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithAny.ts, 0, 26))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithAny.ts, 0, 28))
|
||||
|
||||
then<U, W>(callback: (x: T) => IPromise<U, W>): IPromise<U, W>;
|
||||
>then : Symbol(IPromise.then, Decl(promiseIdentityWithAny.ts, 0, 26))
|
||||
>then : Symbol(IPromise.then, Decl(promiseIdentityWithAny.ts, 0, 33))
|
||||
>U : Symbol(U, Decl(promiseIdentityWithAny.ts, 1, 9))
|
||||
>W : Symbol(W, Decl(promiseIdentityWithAny.ts, 1, 11))
|
||||
>callback : Symbol(callback, Decl(promiseIdentityWithAny.ts, 1, 15))
|
||||
>x : Symbol(x, Decl(promiseIdentityWithAny.ts, 1, 26))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithAny.ts, 0, 19))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithAny.ts, 0, 26))
|
||||
>IPromise : Symbol(IPromise, Decl(promiseIdentityWithAny.ts, 0, 0))
|
||||
>U : Symbol(U, Decl(promiseIdentityWithAny.ts, 1, 9))
|
||||
>W : Symbol(W, Decl(promiseIdentityWithAny.ts, 1, 11))
|
||||
|
@ -18,18 +18,18 @@ interface IPromise<T, V> {
|
|||
>U : Symbol(U, Decl(promiseIdentityWithAny.ts, 1, 9))
|
||||
>W : Symbol(W, Decl(promiseIdentityWithAny.ts, 1, 11))
|
||||
}
|
||||
interface Promise<T, V> {
|
||||
export interface Promise<T, V> {
|
||||
>Promise : Symbol(Promise, Decl(promiseIdentityWithAny.ts, 2, 1))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithAny.ts, 3, 18))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithAny.ts, 3, 20))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithAny.ts, 3, 25))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithAny.ts, 3, 27))
|
||||
|
||||
then<U, W>(callback: (x: T) => Promise<any, any>): Promise<any, any>;
|
||||
>then : Symbol(Promise.then, Decl(promiseIdentityWithAny.ts, 3, 25))
|
||||
>then : Symbol(Promise.then, Decl(promiseIdentityWithAny.ts, 3, 32))
|
||||
>U : Symbol(U, Decl(promiseIdentityWithAny.ts, 4, 9))
|
||||
>W : Symbol(W, Decl(promiseIdentityWithAny.ts, 4, 11))
|
||||
>callback : Symbol(callback, Decl(promiseIdentityWithAny.ts, 4, 15))
|
||||
>x : Symbol(x, Decl(promiseIdentityWithAny.ts, 4, 26))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithAny.ts, 3, 18))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithAny.ts, 3, 25))
|
||||
>Promise : Symbol(Promise, Decl(promiseIdentityWithAny.ts, 2, 1))
|
||||
>Promise : Symbol(Promise, Decl(promiseIdentityWithAny.ts, 2, 1))
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
=== tests/cases/compiler/promiseIdentityWithAny.ts ===
|
||||
interface IPromise<T, V> {
|
||||
export interface IPromise<T, V> {
|
||||
>IPromise : IPromise<T, V>
|
||||
>T : T
|
||||
>V : V
|
||||
|
@ -18,7 +18,7 @@ interface IPromise<T, V> {
|
|||
>U : U
|
||||
>W : W
|
||||
}
|
||||
interface Promise<T, V> {
|
||||
export interface Promise<T, V> {
|
||||
>Promise : Promise<T, V>
|
||||
>T : T
|
||||
>V : V
|
||||
|
|
|
@ -3,7 +3,7 @@ tests/cases/compiler/promiseIdentityWithAny2.ts(22,5): error TS2403: Subsequent
|
|||
|
||||
|
||||
==== tests/cases/compiler/promiseIdentityWithAny2.ts (2 errors) ====
|
||||
interface IPromise<T, V> {
|
||||
export interface IPromise<T, V> {
|
||||
then<U, W>(callback: (x: T) => IPromise<U, W>): IPromise<U, W>;
|
||||
}
|
||||
interface Promise<T, V> {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//// [promiseIdentityWithAny2.ts]
|
||||
interface IPromise<T, V> {
|
||||
export interface IPromise<T, V> {
|
||||
then<U, W>(callback: (x: T) => IPromise<U, W>): IPromise<U, W>;
|
||||
}
|
||||
interface Promise<T, V> {
|
||||
|
@ -23,6 +23,8 @@ var y: IPromise2<string, number>;
|
|||
var y: Promise2<string, boolean>;
|
||||
|
||||
//// [promiseIdentityWithAny2.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
// Error because type parameter arity doesn't match
|
||||
var x;
|
||||
var x;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//// [promiseIdentityWithConstraints.ts]
|
||||
interface IPromise<T, V> {
|
||||
export interface IPromise<T, V> {
|
||||
then<U extends T, W extends V>(callback: (x: T) => IPromise<U, W>): IPromise<U, W>;
|
||||
}
|
||||
interface Promise<T, V> {
|
||||
export interface Promise<T, V> {
|
||||
then<U extends T, W extends V>(callback: (x: T) => Promise<U, W>): Promise<U, W>;
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,8 @@ var x: IPromise<string, number>;
|
|||
var x: Promise<string, boolean>;
|
||||
|
||||
//// [promiseIdentityWithConstraints.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
// Error because constraint V doesn't match
|
||||
var x;
|
||||
var x;
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
=== tests/cases/compiler/promiseIdentityWithConstraints.ts ===
|
||||
interface IPromise<T, V> {
|
||||
export interface IPromise<T, V> {
|
||||
>IPromise : Symbol(IPromise, Decl(promiseIdentityWithConstraints.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 0, 19))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithConstraints.ts, 0, 21))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 0, 26))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithConstraints.ts, 0, 28))
|
||||
|
||||
then<U extends T, W extends V>(callback: (x: T) => IPromise<U, W>): IPromise<U, W>;
|
||||
>then : Symbol(IPromise.then, Decl(promiseIdentityWithConstraints.ts, 0, 26))
|
||||
>then : Symbol(IPromise.then, Decl(promiseIdentityWithConstraints.ts, 0, 33))
|
||||
>U : Symbol(U, Decl(promiseIdentityWithConstraints.ts, 1, 9))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 0, 19))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 0, 26))
|
||||
>W : Symbol(W, Decl(promiseIdentityWithConstraints.ts, 1, 21))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithConstraints.ts, 0, 21))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithConstraints.ts, 0, 28))
|
||||
>callback : Symbol(callback, Decl(promiseIdentityWithConstraints.ts, 1, 35))
|
||||
>x : Symbol(x, Decl(promiseIdentityWithConstraints.ts, 1, 46))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 0, 19))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 0, 26))
|
||||
>IPromise : Symbol(IPromise, Decl(promiseIdentityWithConstraints.ts, 0, 0))
|
||||
>U : Symbol(U, Decl(promiseIdentityWithConstraints.ts, 1, 9))
|
||||
>W : Symbol(W, Decl(promiseIdentityWithConstraints.ts, 1, 21))
|
||||
|
@ -20,20 +20,20 @@ interface IPromise<T, V> {
|
|||
>U : Symbol(U, Decl(promiseIdentityWithConstraints.ts, 1, 9))
|
||||
>W : Symbol(W, Decl(promiseIdentityWithConstraints.ts, 1, 21))
|
||||
}
|
||||
interface Promise<T, V> {
|
||||
export interface Promise<T, V> {
|
||||
>Promise : Symbol(Promise, Decl(promiseIdentityWithConstraints.ts, 2, 1))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 3, 18))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithConstraints.ts, 3, 20))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 3, 25))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithConstraints.ts, 3, 27))
|
||||
|
||||
then<U extends T, W extends V>(callback: (x: T) => Promise<U, W>): Promise<U, W>;
|
||||
>then : Symbol(Promise.then, Decl(promiseIdentityWithConstraints.ts, 3, 25))
|
||||
>then : Symbol(Promise.then, Decl(promiseIdentityWithConstraints.ts, 3, 32))
|
||||
>U : Symbol(U, Decl(promiseIdentityWithConstraints.ts, 4, 9))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 3, 18))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 3, 25))
|
||||
>W : Symbol(W, Decl(promiseIdentityWithConstraints.ts, 4, 21))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithConstraints.ts, 3, 20))
|
||||
>V : Symbol(V, Decl(promiseIdentityWithConstraints.ts, 3, 27))
|
||||
>callback : Symbol(callback, Decl(promiseIdentityWithConstraints.ts, 4, 35))
|
||||
>x : Symbol(x, Decl(promiseIdentityWithConstraints.ts, 4, 46))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 3, 18))
|
||||
>T : Symbol(T, Decl(promiseIdentityWithConstraints.ts, 3, 25))
|
||||
>Promise : Symbol(Promise, Decl(promiseIdentityWithConstraints.ts, 2, 1))
|
||||
>U : Symbol(U, Decl(promiseIdentityWithConstraints.ts, 4, 9))
|
||||
>W : Symbol(W, Decl(promiseIdentityWithConstraints.ts, 4, 21))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
=== tests/cases/compiler/promiseIdentityWithConstraints.ts ===
|
||||
interface IPromise<T, V> {
|
||||
export interface IPromise<T, V> {
|
||||
>IPromise : IPromise<T, V>
|
||||
>T : T
|
||||
>V : V
|
||||
|
@ -20,7 +20,7 @@ interface IPromise<T, V> {
|
|||
>U : U
|
||||
>W : W
|
||||
}
|
||||
interface Promise<T, V> {
|
||||
export interface Promise<T, V> {
|
||||
>Promise : Promise<T, V>
|
||||
>T : T
|
||||
>V : V
|
||||
|
|
|
@ -51,9 +51,9 @@ tests/cases/compiler/promisePermutations.ts(144,12): error TS2453: The type argu
|
|||
tests/cases/compiler/promisePermutations.ts(152,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
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>; }'.
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
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 '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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 'onfulfilled' are incompatible.
|
||||
Type '(value: number) => number | PromiseLike<number>' is not assignable to type '(value: string) => IPromise<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>'.
|
||||
|
@ -68,9 +68,9 @@ tests/cases/compiler/promisePermutations.ts(159,21): error TS2345: Argument of t
|
|||
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>'.
|
||||
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: string) => IPromise<any>' is not assignable to type '(value: number) => Promise<any>'.
|
||||
Type '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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 'onfulfilled' and 'success' are incompatible.
|
||||
Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => number | PromiseLike<number>'.
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
@ -310,9 +310,9 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
|
|||
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! 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: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2453: Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
!!! 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 '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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: Types of parameters 'success' and 'onfulfilled' are incompatible.
|
||||
!!! error TS2453: Type '(value: number) => number | PromiseLike<number>' is not assignable to type '(value: string) => IPromise<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
|
||||
|
@ -339,9 +339,9 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
|
|||
!!! 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: 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: string) => IPromise<any>' is not assignable to type '(value: number) => Promise<any>'.
|
||||
!!! error TS2345: Type '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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 'onfulfilled' and 'success' are incompatible.
|
||||
!!! error TS2345: Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => number | PromiseLike<number>'.
|
||||
!!! error TS2345: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
|
|
@ -51,9 +51,9 @@ tests/cases/compiler/promisePermutations2.ts(143,12): error TS2453: The type arg
|
|||
tests/cases/compiler/promisePermutations2.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
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>'.
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: number) => any' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
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 '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'.
|
||||
Types of parameters 'success' and 'onfulfilled' are incompatible.
|
||||
Type '(value: number) => number | PromiseLike<number>' is not assignable to type '(value: string) => IPromise<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>'.
|
||||
|
@ -68,9 +68,9 @@ tests/cases/compiler/promisePermutations2.ts(158,21): error TS2345: Argument of
|
|||
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>'.
|
||||
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: string) => IPromise<any>' is not assignable to type '(value: number) => any'.
|
||||
Type '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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 'onfulfilled' and 'success' are incompatible.
|
||||
Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => number | PromiseLike<number>'.
|
||||
Types of parameters 'value' and 'value' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
@ -309,9 +309,9 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
|
|||
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! 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: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2453: Type '(value: number) => any' is not assignable to type '(value: string) => IPromise<any>'.
|
||||
!!! 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 '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }'.
|
||||
!!! error TS2453: Types of parameters 'success' and 'onfulfilled' are incompatible.
|
||||
!!! error TS2453: Type '(value: number) => number | PromiseLike<number>' is not assignable to type '(value: string) => IPromise<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
|
||||
|
@ -338,9 +338,9 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
|
|||
!!! 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: 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: string) => IPromise<any>' is not assignable to type '(value: number) => any'.
|
||||
!!! error TS2345: Type '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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 'onfulfilled' and 'success' are incompatible.
|
||||
!!! error TS2345: Type '(value: string) => IPromise<any>' is not assignable to type '(value: number) => number | PromiseLike<number>'.
|
||||
!!! error TS2345: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
|
|
@ -54,9 +54,9 @@ tests/cases/compiler/promisePermutations3.ts(143,12): error TS2453: The type arg
|
|||
tests/cases/compiler/promisePermutations3.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
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>; }'.
|
||||
Types of parameters 'success' and 'success' are incompatible.
|
||||
Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => any'.
|
||||
Type '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>' is not assignable to type '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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 'onfulfilled' are incompatible.
|
||||
Type '(value: number) => number | PromiseLike<number>' is not assignable to type '(value: string) => 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>'.
|
||||
|
@ -71,15 +71,15 @@ tests/cases/compiler/promisePermutations3.ts(158,21): error TS2345: Argument of
|
|||
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>'.
|
||||
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: string) => any' is not assignable to type '(value: number) => Promise<any>'.
|
||||
Type '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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 'onfulfilled' and 'success' are incompatible.
|
||||
Type '(value: string) => any' is not assignable to type '(value: number) => number | PromiseLike<number>'.
|
||||
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>'.
|
||||
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 '<U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>' is not assignable to type '{ (onfulfilled?: (value: any) => any, onrejected?: (reason: any) => any): Promise<any>; <TResult>(onfulfilled: (value: any) => any, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<any>; <TResult>(onfulfilled: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: any) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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>'.
|
||||
|
||||
|
||||
|
@ -321,9 +321,9 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
|||
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! 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: Types of parameters 'success' and 'success' are incompatible.
|
||||
!!! error TS2453: Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => any'.
|
||||
!!! error TS2453: Type '<U>(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>' is not assignable to type '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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: Types of parameters 'success' and 'onfulfilled' are incompatible.
|
||||
!!! error TS2453: Type '(value: number) => number | PromiseLike<number>' is not assignable to type '(value: string) => 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
|
||||
|
@ -350,9 +350,9 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
|||
!!! 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: 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: string) => any' is not assignable to type '(value: number) => Promise<any>'.
|
||||
!!! error TS2345: Type '{ (onfulfilled?: (value: number) => number | PromiseLike<number>, onrejected?: (reason: any) => number | PromiseLike<number>): Promise<number>; <TResult>(onfulfilled: (value: number) => number | PromiseLike<number>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<number | TResult>; <TResult>(onfulfilled: (value: number) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: number) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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 'onfulfilled' and 'success' are incompatible.
|
||||
!!! error TS2345: Type '(value: string) => any' is not assignable to type '(value: number) => number | PromiseLike<number>'.
|
||||
!!! error TS2345: Types of parameters 'value' and 'value' are incompatible.
|
||||
!!! error TS2345: Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
@ -365,6 +365,6 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
|
|||
!!! 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: 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 '<U>(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>' is not assignable to type '{ (onfulfilled?: (value: any) => any, onrejected?: (reason: any) => any): Promise<any>; <TResult>(onfulfilled: (value: any) => any, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<any>; <TResult>(onfulfilled: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult1, TResult2>(onfulfilled: (value: any) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <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
|
Loading…
Reference in a new issue