type R = IsNotArray<number[]> // false
type R = IsNotArray<[1]> // false
type R = IsNotArray<number> // true
🔢 customize
Filter to ensure T
is not an array, otherwise returns never
.
type R = IsNotArray<number[], { selection: 'filter' }> // never
type R = IsNotArray<number, { selection: 'filter' }> // number
🔢 customize
Disable distribution of union types.
type R = IsNotArray<number[] | 1> // boolean
type R = IsNotArray<number[] | 1, { distributive: false }> // true
🔢 customize
Check if T
is not exactly an array, including tuple.
🎭 predicate
Validate that
T
is not an array.