/** * A Last-In-First-Out (LIFO) stack data structure. * @typeparam T - The type of elements stored in the stack */ export declare class Stack { private top; /** * Adds an element to the top of the stack. * @param val - The value to add */ push(val: T): void; /** * Removes the element from the top of the stack. * @throws Error if the stack is empty */ pop(): void; /** * Returns the element at the top of the stack without removing it. * @returns The element at the top of the stack * @throws Error if the stack is empty */ peek(): T; /** * Checks if the stack is empty. * @returns True if the stack contains no elements, false otherwise */ isEmpty(): boolean; /** * Returns the number of elements in the stack. * @returns The size of the stack */ size(): number; } //# sourceMappingURL=stack.d.ts.map