Skip to content

ReferenceArray

Algorand TypeScript


Algorand TypeScript / index / ReferenceArray

Defined in: reference-array.ts:7

An in memory mutable array which is passed by reference

TItem

[index: uint64]: TItem

Get or set the item at the specified index. Negative indexes are not supported

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

Defined in: reference-array.ts:12

Create a new ReferenceArray with the specified items

TItem[]

The initial items for the array

ReferenceArray<TItem>

get length(): uint64

Defined in: reference-array.ts:17

Returns the current length of this array

uint64

[iterator](): IterableIterator<TItem>

Defined in: reference-array.ts:57

Returns an iterator for the items in this array

IterableIterator<TItem>


at(index): TItem

Defined in: reference-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


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

Defined in: reference-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: reference-array.ts:71

Returns an iterator for the indexes in this array

IterableIterator<uint64>


pop(): TItem

Defined in: reference-array.ts:92

Pop a single item from this array

TItem


push(…items): void

Defined in: reference-array.ts:85

Push a number of items into this array

TItem[]

The items to be added to this array

void


slice(): ReferenceArray<TItem>

Defined in: reference-array.ts:34

ReferenceArray<TItem>

Array slicing is not yet supported in Algorand TypeScript Create a new ReferenceArray with all items from this array

slice(end): ReferenceArray<TItem>

Defined in: reference-array.ts:41

Uint64Compat

An index in which to stop copying items.

ReferenceArray<TItem>

Array slicing is not yet supported in Algorand TypeScript Create a new ReferenceArray with all items up till end. Negative indexes are taken from the end.

slice(start, end): ReferenceArray<TItem>

Defined in: reference-array.ts:49

Uint64Compat

An index in which to start copying items.

Uint64Compat

An index in which to stop copying items

ReferenceArray<TItem>

Array slicing is not yet supported in Algorand TypeScript Create a new ReferenceArray with items from start, up until end Negative indexes are taken from the end.