Stack Class
Signature
export declare class Stack<T>
Type Parameters
Parameter | Description |
---|---|
T |
Properties
Property | Type | Description |
---|---|---|
items | T[] |
Methods
Method | Return Type | Description |
---|---|---|
empty() | boolean | |
pop() | T | undefined | |
push(val) | void | |
top() | T | undefined |
Property Details
items
Signature
items: T[];
Type: T[]
Method Details
empty
Signature
empty(): boolean;
Returns
Return type: boolean
pop
Signature
pop(): T | undefined;
Returns
Return type: T | undefined
push
Signature
push(val: T): void;
Parameters
Parameter | Type | Description |
---|---|---|
val | T |
top
Signature
top(): T | undefined;
Returns
Return type: T | undefined