Skip to content

Stack

Type parameters

T

Constructors

new Stack(capacity, initialValues)

new Stack<T>(capacity?, initialValues?): Stack<T>

Parameters

capacity?: number

initialValues?: T[]

Returns

Stack<T>

Methods

items()

items(): T[]

Returns

T[]


peek()

peek(): undefined | T

Returns

undefined | T


pop()

pop(): undefined | T

Returns

undefined | T


push()

push(item): void

Parameters

item: T

Returns

void


size()

size(): number

Returns

number


Generated using typedoc-plugin-markdown and TypeDoc