Skip to content

Arc4ArrayBase

@algorandfoundation/algorand-typescript


@algorandfoundation/algorand-typescript / arc4 / <internal> / Arc4ArrayBase

Class: abstract Arc4ArrayBase<TItem>

Defined in: packages/algo-ts/src/arc4/encoded-types.ts:232

A base type for arc4 array types

Extends

Extended by

Type Parameters

TItem extends ARC4Encoded

Indexable

[index: uint64]: TItem

Constructors

new Arc4ArrayBase()

protected new Arc4ArrayBase<TItem>(): Arc4ArrayBase<TItem>

Defined in: packages/algo-ts/src/arc4/encoded-types.ts:233

Returns

Arc4ArrayBase<TItem>

Overrides

ARC4Encoded.constructor

Accessors

bytes

Get Signature

get bytes(): bytes

Defined in: packages/algo-ts/src/arc4/encoded-types.ts:97

Retrieve the encoded bytes for this type

Returns

bytes

Inherited from

ARC4Encoded.bytes


length

Get Signature

get length(): uint64

Defined in: packages/algo-ts/src/arc4/encoded-types.ts:240

Returns the current length of this array

Returns

uint64

Methods

[iterator]()

[iterator](): IterableIterator<TItem>

Defined in: packages/algo-ts/src/arc4/encoded-types.ts:277

Returns an iterator for the items in this array

Returns

IterableIterator<TItem>


at()

at(index): TItem

Defined in: packages/algo-ts/src/arc4/encoded-types.ts:249

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

Parameters

index

Uint64Compat

The index of the item to retrieve

Returns

TItem


entries()

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

Defined in: packages/algo-ts/src/arc4/encoded-types.ts:284

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

Returns

IterableIterator<readonly [uint64, TItem]>


keys()

keys(): IterableIterator<uint64>

Defined in: packages/algo-ts/src/arc4/encoded-types.ts:291

Returns an iterator for the indexes in this array

Returns

IterableIterator<uint64>


slice()

Call Signature

slice(): DynamicArray<TItem>

Defined in: packages/algo-ts/src/arc4/encoded-types.ts:256

Internal

Create a new Dynamic array with all items from this array

Returns

DynamicArray<TItem>

Call Signature

slice(end): DynamicArray<TItem>

Defined in: packages/algo-ts/src/arc4/encoded-types.ts:262

Internal

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

Parameters
end

Uint64Compat

An index in which to stop copying items.

Returns

DynamicArray<TItem>

Call Signature

slice(start, end): DynamicArray<TItem>

Defined in: packages/algo-ts/src/arc4/encoded-types.ts:269

Internal

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

Parameters
start

Uint64Compat

An index in which to start copying items.

end

Uint64Compat

An index in which to stop copying items

Returns

DynamicArray<TItem>