mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-06 04:35:21 -05:00
Update tests
This commit is contained in:
@@ -2,7 +2,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>;
|
||||
@@ -108,7 +108,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>;
|
||||
@@ -118,9 +118,6 @@ declare module Promise {
|
||||
|
||||
}
|
||||
|
||||
declare module 'bluebird' {
|
||||
export = Promise;
|
||||
}
|
||||
interface Foo {
|
||||
a: number;
|
||||
b: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
interface IPromise<T> {
|
||||
export interface IPromise<T> {
|
||||
then<U>(callback: (x: T) => IPromise<U>): IPromise<U>;
|
||||
}
|
||||
interface Promise<T> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
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,7 +1,7 @@
|
||||
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>;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
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,7 +1,7 @@
|
||||
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>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user