Skip to content

DynamicArray

Algorand TypeScript


Algorand TypeScript / arc4 / DynamicArray

Defined in: arc4/encoded-types.ts:359

A dynamic sized array of arc4 items

TItem extends ARC4Encoded

The type of a single item in the array

[index: uint64]: TItem

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

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

Defined in: arc4/encoded-types.ts:367

Create a new DynamicArray with the specified items

TItem[]

The initial items for the array

DynamicArray<TItem>

Arc4ArrayBase.constructor

get bytes(): bytes

Defined in: arc4/encoded-types.ts:102

Retrieve the encoded bytes for this type

bytes

Arc4ArrayBase.bytes


get length(): uint64

Defined in: arc4/encoded-types.ts:245

Returns the current length of this array

uint64

Arc4ArrayBase.length

[iterator](): IterableIterator<TItem>

Defined in: arc4/encoded-types.ts:292

Returns an iterator for the items in this array

IterableIterator<TItem>

Arc4ArrayBase.[iterator]


at(index): TItem

Defined in: arc4/encoded-types.ts:254

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

Uint64Compat

The index of the item to retrieve

TItem

Arc4ArrayBase.at


concat(other): DynamicArray<TItem>

Defined in: arc4/encoded-types.ts:390

Returns a new array containing all items from this array, and other array

Arc4ArrayBase<TItem>

Another array to concat with this one

DynamicArray<TItem>


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

Defined in: arc4/encoded-types.ts:299

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

IterableIterator<readonly [uint64, TItem]>

Arc4ArrayBase.entries


join(separator?): string

Defined in: arc4/encoded-types.ts:285

Creates a string by concatenating all the items in the array delimited by the specified separator (or ’,’ by default)

string

string

Join is not supported in Algorand TypeScript

Arc4ArrayBase.join


keys(): IterableIterator<uint64>

Defined in: arc4/encoded-types.ts:306

Returns an iterator for the indexes in this array

IterableIterator<uint64>

Arc4ArrayBase.keys


pop(): TItem

Defined in: arc4/encoded-types.ts:382

Pop a single item from this array

TItem


push(…items): void

Defined in: arc4/encoded-types.ts:375

Push a number of items into this array

TItem[]

The items to be added to this array

void


slice(): TItem[]

Defined in: arc4/encoded-types.ts:261

TItem[]

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

Arc4ArrayBase.slice

slice(end): TItem[]

Defined in: arc4/encoded-types.ts:267

Uint64Compat

An index in which to stop copying items.

TItem[]

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

Arc4ArrayBase.slice

slice(start, end): TItem[]

Defined in: arc4/encoded-types.ts:274

Uint64Compat

An index in which to start copying items.

Uint64Compat

An index in which to stop copying items

TItem[]

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

Arc4ArrayBase.slice