The initial length of the collection. By default 0.
Readonly
prefixThe byte prefix to use when storing elements inside this collection.
Private
createCreate a iterator on top of the default collection iterator using custom options.
Optional
options: GetOptions<DataType>Options for retrieving and storing the data.
Get the data stored at the provided index.
The index at which to look for the data.
Optional
options: Omit<GetOptions<DataType>, "serializer">Options for retrieving the data.
Removes and retrieves the element with the highest index.
Optional
options: Omit<GetOptions<DataType>, "serializer">Options for retrieving the data.
Adds data to the collection.
The data to store.
Optional
options: Pick<GetOptions<DataType>, "serializer">Options for storing the data.
Replaces the data stored at the provided index with the provided data and returns the previously stored data.
The index at which to replace the data.
The data to replace with.
Optional
options: GetOptions<DataType>Options for retrieving and storing the data.
Serialize the collection.
Optional
options: Pick<GetOptions<DataType>, "serializer">Options for storing the data.
Optional
options: Omit<GetOptions<DataType>, "serializer">Removes an element from the vector and returns it in serialized form.
The removed element is replaced by the last element of the vector.
Does not preserve ordering, but is O(1)
.
The index at which to remove the element.
Optional
options: GetOptions<DataType>Options for retrieving and storing the data.
Return a JavaScript array of the data stored within the collection.
Optional
options: GetOptions<DataType>Options for retrieving and storing the data.
Static
reconstructGenerated using TypeDoc
An iterable implementation of vector that stores its content on the trie. Uses the following map: index -> element