ReferenceArray
Algorand TypeScript / index / ReferenceArray
Defined in: reference-array.ts:7
An in memory mutable array which is passed by reference
Type Parameters
Section titled “Type Parameters”TItem
Indexable
Section titled “Indexable”[index: uint64]: TItem
Get or set the item at the specified index. Negative indexes are not supported
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ReferenceArray<
TItem>(…items):ReferenceArray<TItem>
Defined in: reference-array.ts:12
Create a new ReferenceArray with the specified items
Parameters
Section titled “Parameters”…TItem[]
The initial items for the array
Returns
Section titled “Returns”ReferenceArray<TItem>
Accessors
Section titled “Accessors”length
Section titled “length”Get Signature
Section titled “Get Signature”get length():
uint64
Defined in: reference-array.ts:17
Returns the current length of this array
Returns
Section titled “Returns”Methods
Section titled “Methods”[iterator]()
Section titled “[iterator]()”[iterator]():
IterableIterator<TItem>
Defined in: reference-array.ts:57
Returns an iterator for the items in this array
Returns
Section titled “Returns”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.
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: reference-array.ts:64
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: reference-array.ts:71
Returns an iterator for the indexes in this array
Returns
Section titled “Returns”IterableIterator<uint64>
pop():
TItem
Defined in: reference-array.ts:92
Pop a single item from this array
Returns
Section titled “Returns”TItem
push()
Section titled “push()”push(…
items):void
Defined in: reference-array.ts:85
Push a number of items into this array
Parameters
Section titled “Parameters”…TItem[]
The items to be added to this array
Returns
Section titled “Returns”void
slice()
Section titled “slice()”Call Signature
Section titled “Call Signature”slice():
ReferenceArray<TItem>
Defined in: reference-array.ts:34
Returns
Section titled “Returns”ReferenceArray<TItem>
Deprecated
Section titled “Deprecated”Array slicing is not yet supported in Algorand TypeScript Create a new ReferenceArray with all items from this array
Call Signature
Section titled “Call Signature”slice(
end):ReferenceArray<TItem>
Defined in: reference-array.ts:41
Parameters
Section titled “Parameters”An index in which to stop copying items.
Returns
Section titled “Returns”ReferenceArray<TItem>
Deprecated
Section titled “Deprecated”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.
Call Signature
Section titled “Call Signature”slice(
start,end):ReferenceArray<TItem>
Defined in: reference-array.ts:49
Parameters
Section titled “Parameters”An index in which to start copying items.
An index in which to stop copying items
Returns
Section titled “Returns”ReferenceArray<TItem>
Deprecated
Section titled “Deprecated”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.