Skip to content

Type Alias: EmitFunctions<T> ​

ts
type EmitFunctions<T> = {
  [K in keyof T]: T[K] extends (args: infer P) => boolean
    ? (args: P) => void
    : never;
};

Converts emit validators into emit functions. Maps validator signatures (args => boolean) to emit functions (args => void).

Type Parameters ​

Type ParameterDescription
T extends EmitValidatorsThe emit validators type