Arc4ArrayBase
@algorandfoundation/algorand-typescript
@algorandfoundation/algorand-typescript / arc4 / <internal> / Arc4ArrayBase
Class: abstract Arc4ArrayBase<TItem>
Section titled “Class: abstract Arc4ArrayBase<TItem>”Defined in: packages/algo-ts/src/arc4/encoded-types.ts:232
A base type for arc4 array types
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”• TItem extends ARC4Encoded
Indexable
Section titled “Indexable”[index: uint64]: TItem
Constructors
Section titled “Constructors”new Arc4ArrayBase()
Section titled “new Arc4ArrayBase()”
protectednew Arc4ArrayBase<TItem>():Arc4ArrayBase<TItem>
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:233
Returns
Section titled “Returns”Arc4ArrayBase<TItem>
Overrides
Section titled “Overrides”Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get bytes():
bytes
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:97
Retrieve the encoded bytes for this type
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”length
Section titled “length”Get Signature
Section titled “Get Signature”get length():
uint64
Defined in: packages/algo-ts/src/arc4/encoded-types.ts:240
Returns the current length of this array
Returns
Section titled “Returns”Methods
Section titled “Methods”[iterator]()
Section titled “[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
Section titled “Returns”IterableIterator<TItem>
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
Section titled “Parameters”The index of the item to retrieve
Returns
Section titled “Returns”TItem
entries()
Section titled “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
Section titled “Returns”IterableIterator<readonly [uint64, TItem]>
keys()
Section titled “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
Section titled “Returns”slice()
Section titled “slice()”Call Signature
Section titled “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
Section titled “Returns”DynamicArray<TItem>
Call Signature
Section titled “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
Section titled “Parameters”An index in which to stop copying items.
Returns
Section titled “Returns”DynamicArray<TItem>
Call Signature
Section titled “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
Section titled “Parameters”An index in which to start copying items.
An index in which to stop copying items
Returns
Section titled “Returns”DynamicArray<TItem>