Type Alias IsNotTuple<T, $O>

IsNotTuple<T, $O>: $SpecialType<T, $MergeOptions<$O, {
    $else: IsNotTuple.$<T, $O>;
    $then: $ResolveBranch<T, $O, [$Then]>;
}>>

🎭 predicate

Validate that T is not a tuple, excluding array.

type R = IsNotTuple<[]>       // false
type R = IsNotTuple<[1]> // false

type R = IsNotTuple<number[]> // true
type R = IsNotTuple<string> // true
type R = IsNotTuple<never> // true
type R = IsNotTuple<unknown> // true

🔢 customize

Filter to ensure T is not a tuple, otherwise returns never.

Type Parameters

type R = IsNotTuple<[], { selection: 'filter' }> // never
type R = IsNotTuple<[1], { selection: 'filter' }> // never

type R = IsNotTuple<never, { selection: 'filter' }> // never
type R = IsNotTuple<unknown, { selection: 'filter' }> // unknown
type R = IsNotTuple<[] | boolean, { selection: 'filter' }> // boolean
type R = IsNotTuple<[1] | bigint> // bigint

🔢 customize:

Disable distribution of union types.

type R = IsNotTuple<[] | 1> // boolean
type R = IsNotTuple<[] | 1, { distributive: false }> // false

🔢 customize

Use unique branch identifiers to allow precise processing of the result.

type R = IsNotTuple<bigint, IsNotTuple.$Branch> // $Then
type R = IsNotTuple<[], IsNotTuple.$Branch> // $Else