c123700e1bd2135c9d44f4e9f06eb272f13d3c4b0023a5414e9ea99d6da5c94d9abb646fd67f0f57de9684f3d7c37eeae6011e618b98bca159946f24c84367 644 B

12345678910111213141516171819202122
  1. import { Base, initContainer } from "../ContainerBase";
  2. declare class Stack<T> extends Base {
  3. constructor(container?: initContainer<T>);
  4. clear(): void;
  5. /**
  6. * @description Insert element to stack's end.
  7. * @description The element you want to push to the back.
  8. * @returns The container length after erasing.
  9. */
  10. push(element: T): number;
  11. /**
  12. * @description Removes the end element.
  13. * @returns The element you popped.
  14. */
  15. pop(): T | undefined;
  16. /**
  17. * @description Accesses the end element.
  18. * @returns The last element.
  19. */
  20. top(): T | undefined;
  21. }
  22. export default Stack;