websocket-ts
    Preparing search index...

    Class ArrayQueue<E>

    An array queue is a queue that has an unbounded capacity. Reading from an array queue will return the oldest element and effectively remove it from the queue.

    Type Parameters

    • E

    Implements

    Index

    Constructors

    Methods

    • Calls the given function for each element in the queue.

      Parameters

      • fn: (element: E) => unknown

        the function to call

      Returns void

    • Returns the next element in the queue without removing it.

      Returns undefined | E

      the next element in the queue, or undefined if the queue is empty

    • Removes and returns the next element in the queue.

      Returns undefined | E

      the next element in the queue, or undefined if the queue is empty