The advanced options that can be used to control the construction with Vector.from or BigVector.from

interface VectorFromOptions {
    initialCapacity?: number;
    growthFn?: ((current: number) => number);
}

Properties

initialCapacity?: number

The initial capacity of the Vector.

0, unless initialLength is greater.

growthFn?: ((current: number) => number)

This method is called when the Vector needs to be resized to determine how much more memory should be allocated. The default behavior is to grow by a rate of 1.5.

(current: number) => Math.ceil(current * 1.5)