ForEachCallback
ForEachCallback<Value, Payload>
ForEachCallback<Value, Payload>
Represents a callback function of .forEach()
method which is executed once for each element.
foreach-callback.type.ts
Generic type variables
Value
=
any
Value
=
any
A generic type variable Value
determines the type of the value
parameter, by default any
.
Payload
=
object
Payload
=
object
The shape of the optional payload
parameter, by default object
.
Parameters
result: boolean
result: boolean
The result of the check of a boolean
type.
value: Value
value: Value
The value that has been checked of a generic type variable Value
.
index: number
index: number
An optional number
of checked array
element.
array: any[]
array: any[]
An optional array
of any
type that each element is checked.
payload?: Payload
payload?: Payload
An optional object
of a generic type variable Payload
to provide more data.
Return type
The return value is void.
Last updated