$List<T extends JSAny?> function
- @JS('List')
- AnonymousUnion_9648237<
JSAny?> ? collection
Create a new immutable List containing the values of the provided collection-like.
Note: List is a factory function and not a class, and does not use the
new keyword during construction.
Lists are ordered indexed dense collections, much like a JavaScript
Array.
Lists are immutable and fully persistent with O(log32 N) gets and sets, and O(1) push and pop.
Lists implement Deque, with efficient addition and removal from both the
end (push, pop) and beginning (unshift, shift).
Unlike a JavaScript Array, there is no distinction between an
"unset" index and an index set to undefined. List#forEach visits all
indices from 0 to size, regardless of whether they were explicitly
defined.
Implementation
@_i1.JS('List')
external _i1.JSFunction $List<T extends _i1.JSAny?>([
AnonymousUnion_9648237? collection,
]);