Type alias Predicate<A>

Predicate<A>: ((a) => boolean)

Type Parameters

  • A

    any type

Type declaration

    • (a): boolean
    • Type alias for functions that given a value returns true or false.

      Parameters

      • a: A

      Returns boolean

      Example

      // All the following are valid predicate examples
      const fn1 = (a: number) => a % 2 === 0
      const fn2 = (a: string) => a.length === 3
      const fn3 = (_a: any) => true

Generated using TypeDoc