mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
#305: add mfa step during auth
This commit is contained in:
29
flow-typed/Promise.js
vendored
Normal file
29
flow-typed/Promise.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* This is a copypasted declaration from
|
||||
* https://github.com/facebook/flow/blob/master/lib/core.js
|
||||
* with addition of finally method
|
||||
*/
|
||||
declare class Promise<+R> {
|
||||
constructor(callback: (
|
||||
resolve: (result: Promise<R> | R) => void,
|
||||
reject: (error: any) => void
|
||||
) => mixed): void;
|
||||
|
||||
then<U>(
|
||||
onFulfill?: (value: R) => Promise<U> | U,
|
||||
onReject?: (error: any) => Promise<U> | U
|
||||
): Promise<U>;
|
||||
|
||||
catch<U>(
|
||||
onReject?: (error: any) => Promise<U> | U
|
||||
): Promise<R | U>;
|
||||
|
||||
static resolve<T>(object: Promise<T> | T): Promise<T>;
|
||||
static reject<T>(error?: any): Promise<T>;
|
||||
static all<Elem, T:Iterable<Elem>>(promises: T): Promise<$TupleMap<T, typeof $await>>;
|
||||
static race<T, Elem: Promise<T> | T>(promises: Array<Elem>): Promise<T>;
|
||||
|
||||
finally<T>(
|
||||
onSettled?: ?(value: any) => Promise<T> | T
|
||||
): Promise<T>;
|
||||
}
|
Reference in New Issue
Block a user