An ordered iterable collection. It optionally enforces the type of elements that may be added to the List.
This creates a List that checks the type of the values to be instances of a particular kind of Object.
this must be a class function/constructor.
This creates a List that may check the types of the values.
if supplied, this must be one of: 'number', 'string', 'boolean', or 'function' for the value type.
Gets the length of the List.
Gets an object that you can use for iterating over the List.
Gets an object that you can use for iterating over the List in backwards order.
Gets the length of the List, a synonym for the #count property.
Adds a given value to the end of the List.
any
Adds all of the values of a collection (either an Iterable or an Array) to the end of this List.
Clears the List.
any
Returns whether the given value is in this List.
boolean
Makes a shallow copy of this List.
Returns the element at the given index.
any
Returns the first item in the collection, or null if there is none.
any
Returns the index of the given value if it is in this List.
number
Insert a value before the index i.
any
Removes a given value (if found) from the List.
boolean
Removes a value at a given index from the List.
any
Removes a range of values from the List.
any
Reverse the order of items in this List.
Set the element at the given index to a given value.
any
Sort the List according to a comparison function.
the same kind of function as passed to Array.sort
Produces a JavaScript Array from the contents of this List.
Array<any>
Converts the List to a Set.