Function: isCollection()
isCollection<
T>(value):value is Collection<T>
Type guard for a Collection: an Array, Set, or
Map. Narrows value so its element/value type is treated as T.
Type Parameters
Section titled “Type Parameters”T = unknown
Element (or Map value) type asserted for the collection.
Parameters
Section titled “Parameters”unknown
Value to test.
Returns
Section titled “Returns”value is Collection<T>
true (narrowing value to Collection<T>) for a
built-in array/set/map.