@twinfinity/core
    Preparing search index...

    Class LazyResizableTypedArray<K, T>

    A growable typed array.

    Type Parameters

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    buffer: T

    Direct access to the Typed array. Reference may change if setMinLength is called. Therefore avoid storing a refernce to this buffer in other places.

    Triggered after (and if) buffer has been resized when setMinLength was called.

    Accessors

    • get isEmpty(): boolean

      true if buffer is empty.

      Returns boolean

    • get uint8(): Uint8Array

      Uint8Array view of buffer.

      Returns Uint8Array

      Uint8Array wrapping buffer.

    Methods

    • Empties array. (buffer is set to zero sized array.)

      Returns void

    • Sets minimum length of array. Array is only resized if minLength is larger than current array size.

      Parameters

      • minLength: number

        New minimal size of array.

      Returns boolean

      true if array was resized.