Skip to content

MutableArray

@algorandfoundation/algorand-typescript


@algorandfoundation/algorand-typescript / index / MutableArray

Defined in: packages/algo-ts/src/mutable-array.ts:7

An in memory mutable array which is passed by reference

TItem

[index: uint64]: TItem

new MutableArray<TItem>(…items): MutableArray<TItem>

Defined in: packages/algo-ts/src/mutable-array.ts:12

Create a new MutableArray with the specified items

TItem[]

The initial items for the array

MutableArray<TItem>

get length(): uint64

Defined in: packages/algo-ts/src/mutable-array.ts:17

Returns the current length of this array

uint64

[iterator](): IterableIterator<TItem>

Defined in: packages/algo-ts/src/mutable-array.ts:57

Returns an iterator for the items in this array

IterableIterator<TItem>


at(index): TItem

Defined in: packages/algo-ts/src/mutable-array.ts:26

Returns the item at the given index. Negative indexes are taken from the end.

Uint64Compat

The index of the item to retrieve

TItem


copy(): MutableArray<TItem>

Defined in: packages/algo-ts/src/mutable-array.ts:99

Create a copy of this array

MutableArray<TItem>


entries(): IterableIterator<readonly [uint64, TItem]>

Defined in: packages/algo-ts/src/mutable-array.ts:64

Returns an iterator for a tuple of the indexes and items in this array

IterableIterator<readonly [uint64, TItem]>


keys(): IterableIterator<uint64>

Defined in: packages/algo-ts/src/mutable-array.ts:71

Returns an iterator for the indexes in this array

IterableIterator<uint64>


pop(): TItem

Defined in: packages/algo-ts/src/mutable-array.ts:92

Pop a single item from this array

TItem


push(…items): void

Defined in: packages/algo-ts/src/mutable-array.ts:85

Push a number of items into this array

TItem[]

The items to be added to this array

void


slice(): MutableArray<TItem>

Defined in: packages/algo-ts/src/mutable-array.ts:34

Internal

Create a new Dynamic array with all items from this array Not supported yet

MutableArray<TItem>

slice(end): MutableArray<TItem>

Defined in: packages/algo-ts/src/mutable-array.ts:41

Internal

Create a new MutableArray with all items up till end. Negative indexes are taken from the end.

Uint64Compat

An index in which to stop copying items. Not supported yet

MutableArray<TItem>

slice(start, end): MutableArray<TItem>

Defined in: packages/algo-ts/src/mutable-array.ts:49

Internal

Create a new MutableArray with items from start, up until end Negative indexes are taken from the end.

Uint64Compat

An index in which to start copying items.

Uint64Compat

An index in which to stop copying items Not supported yet

MutableArray<TItem>