UNPKG

446 BTypeScriptView Raw
1/**
2 * Generic interface for collections implementing
3 * stack functionality.
4 *
5 * @param V - value type
6 * @param P - return type for pop()
7 * @param S - return type for push()
8 */
9export interface IStack<V, P, S> {
10 /**
11 * Returns top-of-stack item.
12 */
13 peek(): V | undefined;
14 /**
15 * Removes top-of-stack item and returns type P.
16 */
17 pop(): P | undefined;
18 push(x: V): S;
19}
20//# sourceMappingURL=stack.d.ts.map
\No newline at end of file