Skip to content

Latest commit

 

History

History
108 lines (61 loc) · 1.94 KB

File metadata and controls

108 lines (61 loc) · 1.94 KB

dangraph / Exports / utils/danStack / Stackable

Interface: Stackable<T>

utils/danStack.Stackable

A Stackable interface is composed of: push -> insert a value to the top of the stack pop -> get the value from the top of the stack and remove it from the stack itself peek -> get the value from the top of the stack but do not remove it from the stack itself isEmpty -> check if the stack is empty clear -> clear all stack's elements

Type parameters

Name
T

Implemented by

Table of contents

Methods

Methods

clear

clear(): void

Returns

void

Defined in

src/utils/danStack.ts:14


isEmpty

isEmpty(): boolean

Returns

boolean

Defined in

src/utils/danStack.ts:13


peek

peek(): undefined | T

Returns

undefined | T

Defined in

src/utils/danStack.ts:12


pop

pop(): undefined | T

Returns

undefined | T

Defined in

src/utils/danStack.ts:11


push

push(val): void

Parameters

Name Type
val T

Returns

void

Defined in

src/utils/danStack.ts:10