Type Alias EmitFn<Options, Event>

EmitFn<Options, Event>: Options extends (infer V)[]
    ? ((event: V, ...args: any[]) => void)
    : {} extends Options
        ? ((event: string, ...args: any[]) => void)
        : UnionToIntersection<{
            [key in Event]: Options[key] extends ((...args: infer Args) => any)
                ? ((event: key, ...args: Args) => void)
                : Options[key] extends any[]
                    ? ((event: key, ...args: Options[key]) => void)
                    : ((event: key, ...args: any[]) => void)
        }[Event]>

Type Parameters