UNPKG

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