The initial length of the collection. By default 0.
ReadonlyprefixThe byte prefix to use when storing elements inside this collection.
Extends the current collection with the passed in array of elements.
The elements to extend the collection with.
Get the data stored at the provided index.
The index at which to look for the data.
Optionaloptions: Omit<GetOptions<DataType>, "serializer">Options for retrieving the data.
Removes and retrieves the element with the highest index.
Optionaloptions: Omit<GetOptions<DataType>, "serializer">Options for retrieving the data.
Adds data to the collection.
The data to store.
Optionaloptions: 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.
Optionaloptions: GetOptions<DataType>Options for retrieving and storing the data.
Serialize the collection.
Optionaloptions: Pick<GetOptions<DataType>, "serializer">Options for storing the data.
Optionaloptions: 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.
Optionaloptions: GetOptions<DataType>Options for retrieving and storing the data.
Return a JavaScript array of the data stored within the collection.
Optionaloptions: GetOptions<DataType>Options for retrieving and storing the data.
Staticreconstruct
An iterable implementation of vector that stores its content on the trie. Uses the following map: index -> element