mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
Add type constraint to wrapError
This commit is contained in:
6
src/vs/base/common/winjs.base.d.ts
vendored
6
src/vs/base/common/winjs.base.d.ts
vendored
@@ -33,7 +33,7 @@ export declare class Promise {
|
||||
// commented out to speed up adoption of TPromise
|
||||
// static timeout(delay:number):Promise;
|
||||
|
||||
static wrapError(error: any): Promise;
|
||||
static wrapError(error: Error): Promise;
|
||||
// static is(value: any): value is Thenable<any>;
|
||||
// static addEventListener(type: string, fn: EventCallback): void;
|
||||
|
||||
@@ -106,7 +106,7 @@ export declare class TPromise<V> {
|
||||
public static wrap<ValueType>(value: Thenable<ValueType>): TPromise<ValueType>;
|
||||
public static wrap<ValueType>(value: ValueType): TPromise<ValueType>;
|
||||
|
||||
public static wrapError<ValueType>(error: any): TPromise<ValueType>;
|
||||
public static wrapError<ValueType>(error: Error): TPromise<ValueType>;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@@ -134,5 +134,5 @@ export declare class PPromise<C, P> extends TPromise<C> {
|
||||
public static join<C, P>(promises: PPromise<C, P>[]): PPromise<C, P[]>;
|
||||
public static join<C, P>(promises: { [n: string]: PPromise<C, P> }): PPromise<{ [n: string]: C }, P>;
|
||||
public static any<C, P>(promises: PPromise<C, P>[]): PPromise<{ key: string; value: PPromise<C, P>; }, P>;
|
||||
public static wrapError<V>(error: any): TPromise<V>;
|
||||
public static wrapError<V>(error: Error): TPromise<V>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user