- assertHasItems<T>(array: undefined | null | T[]): asserts array is NonEmptyArray<T>
-
Parameters
-
array: undefined | null | T[]
Returns asserts array is NonEmptyArray<T>
- assertHasItems<T>(iterable: undefined | null | Iterable<T>): asserts iterable is Iterable<T>
-
Parameters
-
iterable: undefined | null | Iterable<T>
Returns asserts iterable is Iterable<T>
Throws an error if and only if the given array is
null
,undefined
or has no items.See
hasItems