All Components

Predicate

Type representing a function which returns a boolean value.

const isGreaterThanTen: Predicate = (num: number) => num > 10;
isGreaterThanTen(2); // false
isGreaterThanTen(20); // true
In this article