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