Represents an array with unknown value.
unknown
Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
import type {UnknownArray} from 'type-fest';type IsArray<T> = T extends UnknownArray ? true : false;type A = IsArray<['foo']>;//=> truetype B = IsArray<readonly number[]>;//=> truetype C = IsArray<string>;//=> false Copy
import type {UnknownArray} from 'type-fest';type IsArray<T> = T extends UnknownArray ? true : false;type A = IsArray<['foo']>;//=> truetype B = IsArray<readonly number[]>;//=> truetype C = IsArray<string>;//=> false
Represents an array with
unknownvalue.Use case: You want a type that all arrays can be assigned to, but you don't care about the value.