Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 540 Bytes

polyethylene.indexedtypepredicate.md

File metadata and controls

13 lines (8 loc) · 540 Bytes

Home > polyethylene > IndexedTypePredicate

IndexedTypePredicate type

A function that receives an object (elem) and its index in the iteration and returns a boolean value indicating if elem is of the generic type U

Signature:

export type IndexedTypePredicate<T, U extends T> = (elem: T, index: number) => elem is U;