All Components

Predicate

A type representing a function that returns a Boolean value.

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