Type Alias: CastToEmitValidators<T>
ts
type CastToEmitValidators<T> = {
[K in keyof T]: T[K] extends (args: infer P) => void
? (args: P) => boolean
: never;
};Converts emit functions back into emit validators. Maps emit functions (args => void) to validator signatures (args => boolean).
Type Parameters
| Type Parameter | Description |
|---|---|
T extends EmitFunctions<EmitValidators> | The emit functions type |