Skip to content

Function: emitsFactory()

ts
function emitsFactory<T>(validators: T): EmitFunctions<T>;

Creates emit functions from emit validators. Simply type-casts validators to emit functions; the actual validation happens elsewhere.

Type Parameters

Type ParameterDescription
T extends EmitValidatorsThe emit validators type

Parameters

ParameterTypeDescription
validatorsTThe emit validators object

Returns

EmitFunctions<T>

The validators cast as emit functions