A simple queue implementation.

Type Parameters

  • T

Hierarchy

  • Queue

Constructors

Properties

Accessors

Methods

Constructors

  • Type Parameters

    • T

    Returns Queue<T>

Properties

_head: number = 0
_queue: {
    [index: number]: T;
} = {}

Type declaration

  • [index: number]: T
_tail: number = 0

Accessors

  • get length(): number
  • Returns number

Methods

  • Returns undefined | T

  • Parameters

    • element: T

    Returns void

Generated using TypeDoc