Type alias Predicate<Input, Predicated>

Predicate<Input, Predicated>: Unary<Input, boolean> | ((input: Input) => input is Predicated)

Function that returns boolean (Unary).

Example

const isEven: Predicate<number> = n => n % 2 === 0;

Type Parameters

  • Input

  • Predicated extends Input = Input