import { Fn } from '../Fn'; import { Invoke } from '../Invoke'; import { Option, OptionSome } from '../types'; import { IfInvoking, Input } from '../utils'; export interface Map> extends Fn, Option> { out: IfInvoking>, Option>; } export type InvokeMap, In extends Option> = [In] extends [OptionSome] ? OptionSome, T['out']> : In;