/** * Stack actions interface */ export type StackActions = { push: (value: T) => void; pop: () => T | undefined; peek: () => T | undefined; clear: () => void; reset: () => void; }; /** * Hook that implements LIFO stack * * @template T - Element type * @param initialValue - Initial stack values * @returns Tuple of [stack, actions] * * @example * ```tsx * const [stack, { push, pop, peek, size }] = useStack([1, 2, 3]); * * return ( *
* * *

Top: {peek()}

*

Size: {size}

*
{JSON.stringify(stack, null, 2)}
*
* ); * ``` */ export declare function useStack(initialValue?: T[]): [T[], StackActions & { size: number; }]; //# sourceMappingURL=useStack.d.ts.map