// @flow // see https://gist.github.com/thecotne/6e5969f4aaf8f253985ed36b30ac9fe0 type $FlowGen$If = $Call< ((true, Then, Else) => Then) & ((false, Then, Else) => Else), X, Then, Else >; type $FlowGen$Assignable = $Call< ((...r: [B]) => true) & ((...r: [A]) => false), A >; export type Array = $FlowGen$If< $FlowGen$Assignable, T[], $ReadOnlyArray >; export type Mutable = $ObjMapi(P) => $ElementType>; export type EmptyObject = { [key: string]: any, ... }; export type ExtractValue = Exclude; export type ExtractNested = $FlowGen$If< $FlowGen$Assignable>, ExtractNested, T >; export type GuardArray = $FlowGen$If< $FlowGen$Assignable>, empty>, Array, Extract> >; export type GuardPromise = $FlowGen$If< $FlowGen$Assignable>, empty>, Promise, Extract> >; export type GuardObject = $FlowGen$If< $FlowGen$Assignable< Exclude, Function | Array>, empty >, { [k: string]: mixed, ... }, Exclude, Function | Array> >; export type GuardValue = $FlowGen$If< $FlowGen$Assignable, empty>, V, $FlowGen$If<$FlowGen$Assignable, any>, V, Extract> >;