Or<T>: T extends readonly [infer Head, ...(infer Tail)]
    ? Head extends true
        ? true
        : Or<Tail>
    : false

Type Parameters

  • T extends readonly unknown[]

    Type to check

Description

Evaluates boolean "or" condition for T properties.

Example

type Result = Or<[false, true, false]>
// ^? type Result = true

Example

type Result = Or<[false, false, false]>
// ^? type Result = false

Generated using TypeDoc