Assert that a type is an array or readonly array.
array
Type that must be an array
Ensures that the given type is assignable to a tuple or array type. Fails at compile time for non-array types.
type A = AssertArray< number[] >; // ✓type B = AssertArray< readonly string[] >; // ✓type C = AssertArray< string >; // ✗ TS error Copy
type A = AssertArray< number[] >; // ✓type B = AssertArray< readonly string[] >; // ✓type C = AssertArray< string >; // ✗ TS error
Assert that a type is an array or readonly
array.