@webdeveric/ts-data-structures
    Preparing search index...

    Class Queue<Item>

    First in first out 🇬🇧

    Type Parameters

    • Item

    Implements

    Index

    Accessors

    • get size(): number

      Get the number of items in the queue.

      Returns number

    • get "[toStringTag]"(): string

      Identify itself in Object.toString()

      Returns string

    Methods

    • Determine if the queue is empty.

      Returns boolean

    • Get an iterator for the queue.

      Iterating the queue will drain it.

      Returns Generator<Item>

    • Add one or more items to the queue and return the new size.

      Parameters

      Returns number

    • Get the next item and remove it from the queue

      Returns Item | undefined

    • Get the next item and leave it in the queue

      Returns Item | undefined

    • Get the last item and leave it in the queue

      Returns Item | undefined