UNPKG

@yoroi/types

Version:
51 lines (47 loc) 1.06 kB
/** * Flowtype definitions for types * Generated by Flowgen from a Typescript Definition * Flowgen v1.21.0 */ // see https://gist.github.com/thecotne/6e5969f4aaf8f253985ed36b30ac9fe0 type $FlowGen$If<X: boolean, Then, Else = empty> = $Call< ((true, Then, Else) => Then) & ((false, Then, Else) => Else), X, Then, Else >; type $FlowGen$Assignable<A, B> = $Call< ((...r: [B]) => true) & ((...r: [A]) => false), A >; export type Maybe<T> = T | null | void; export type Writable<T> = $ObjMapi< T, <P>( P ) => $FlowGen$If< $FlowGen$Assignable<$ElementType<T, P>, { [key: string]: any }>, Writable<$ElementType<T, P>>, $ElementType<T, P> > >; export type RemoveUndefined<T> = $ObjMapi< T, <K>(K) => Exclude<$ElementType<T, K>, void> >; export type Left<E> = { tag: "left", error: E, ... }; export type Right<T> = { tag: "right", value: T, ... }; export type Either<E, T> = Left<E> | Right<T>; export type MaybePromise<T, IsAsync: boolean> = $FlowGen$If< $FlowGen$Assignable<IsAsync, true>, Promise<T>, T >;