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>; export type NotArrayValueMap = OmitByValue; export type OptionalNormalNames = OptionalKeys>; export type RequiredNormalNames = RequiredKeys>; export type OtherNames = EventNames>; export type UnknownNames = Exclude>;