Skip to main content

UnknownArray

UnknownArray = readonly unknown[]

Defined in: packages/react-querybuilder/src/types/type-fest/unknown-array.ts:24

Represents an array with unknown value.

Use case: You want a type that all arrays can be assigned to, but you don't care about the value.

Example

import type {UnknownArray} from 'type-fest';

type IsArray<T> = T extends UnknownArray ? true : false;

type A = IsArray<['foo']>;
//=> true

type B = IsArray<readonly number[]>;
//=> true

type C = IsArray<string>;
//=> false

caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.