Accessors
length
- get length(): number
Returns number
Methods
[iterator]
- [iterator](): Generator<T, void, unknown>
Returns Generator<T, void, unknown>
clear
- clear(): void
Returns void
get
- get(index): Generator<never, T, unknown>
Returns Generator<never, T, unknown>
move
- move(from, to): void
Returns void
push
- push(...items): number
Returns number
set
- set(index, value): T
Returns T
splice
- splice(start, deleteCount?, ...items): ArrayList<T> | T[]
Parameters
- start: number
Optional
deleteCount: numberRest
...items: T[]
swap
- swap(from, to): void
Returns void
unshift
- unshift(...items): number
Returns number
Wraps an array exposing the same mutation API (
push
,pop
,unshift
,shift
,splice
) and adds a few extra methods namely:set
,move
,swap
andclear
.Example