import { RequiredKeys, OmitByValue, OptionalKeys, PickByValue, } from 'utility-types' export type Handler = Args extends null | undefined ? () => any : Args extends any[] ? (...args: Args) => any : (args: Args) => any export type EventArgs = { [key: string]: any } export type EventNames = Extract /** * Get union type of keys from `M` that value matching `any[]`. */ export type NamesWithArrayArgs = RequiredKeys< PickByValue > export type NotArrayValueMap = OmitByValue export type OptionalNormalNames = OptionalKeys< NotArrayValueMap > export type RequiredNormalNames = RequiredKeys< NotArrayValueMap > export type OtherNames = EventNames< PickByValue > export type UnknownNames = Exclude>