ResultCallback

ResultCallback<Value, Payload>

Represents a callback function with parameters, the value that has been checked, the result of this check, and an optional payload.

result-callback.type.ts
type ResultCallback<Value = any, Payload = object> = (
  result: boolean,
  value: Value,
  payload?: Payload
) => boolean;

Generic type variables

Value=any

A generic type variable Value determines value parameter type, by default anyarrow-up-right.

Payload=object

Generic type variable Payload indicates payload parameter type, by default objectarrow-up-right.

Parameters

result: boolean

The check result of a booleanarrow-up-right type of the given value.

value: Value

The value of the generic type variable Value to check and which the given check result applies.

payload?: Payload

An optional objectarrow-up-right of a generic type variable Payload to provide more data.

Returns

The return value is a booleanarrow-up-right indicating the check result of the given value.

Last updated