mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add Promise.config() to Bluebird
See http://bluebirdjs.com/docs/api/promise.config.html
This commit is contained in:
Vendored
+7
@@ -23,6 +23,13 @@ interface PromiseConstructor {
|
||||
* Create a new promise. The passed in function will receive functions `resolve` and `reject` as its arguments which can be called to seal the fate of the created promise.
|
||||
*/
|
||||
new <T>(callback: (resolve: (thenableOrResult?: T | PromiseLike<T>) => void, reject: (error: any) => void) => void): Promise<T>;
|
||||
|
||||
config(options: {
|
||||
warnings?: boolean | {wForgottenReturn?: boolean};
|
||||
longStackTraces?: boolean;
|
||||
cancellation?: boolean;
|
||||
monitoring?: boolean;
|
||||
}): void;
|
||||
|
||||
// Ideally, we'd define e.g. "export class RangeError extends Error {}",
|
||||
// but as Error is defined as an interface (not a class), TypeScript doesn't
|
||||
|
||||
Reference in New Issue
Block a user