An alternative for TypeScript's ArrayLike type, with its type set to
unknown by default.
Remarks
When working with optional types, having to type ArrayLike<unknown> every
time gets annoying pretty fast. This type is a drop-in replacement for
ArrayLike, with the only difference being that the type of the items is
set to unknown by default.
An alternative for TypeScript's
ArrayLike
type, with its type set tounknown
by default.Remarks
When working with optional types, having to type
ArrayLike<unknown>
every time gets annoying pretty fast. This type is a drop-in replacement forArrayLike
, with the only difference being that the type of the items is set tounknown
by default.Example