UNPKG

218 BTypeScriptView Raw
1import { Option } from './core';
2
3export interface Stack<T> {
4 current: Option<T>;
5
6 size: number;
7 push(item: T): void;
8 pop(): Option<T>;
9 nth(from: number): Option<T>;
10 isEmpty(): boolean;
11 toArray(): T[];
12}