import type { ErrorInfo, PreactContext } from 'preact'; import type { Dispatch, useEffect as useEffectType, useErrorBoundary as useErrorBoundaryType, useImperativeHandle as useImperativeHandleType, useLayoutEffect as useLayoutEffectType } from 'preact/hooks'; declare function useState(initialState: S | (() => S)): [S, Dispatch]; declare function useReducer(_reducer: (prevState: S, action: A) => S, initialState: S | (() => S), init?: (initialState: S) => S): [S, Dispatch]; declare function useRef(initialValue?: T): { current: T | undefined; }; declare function useMemo(factory: () => T, _args: ReadonlyArray): T; declare function useCallback(callback: T, args: ReadonlyArray): T; declare function useContext(context: PreactContext): T; declare function useDebugValue(value: T, formatter?: (value: T) => string | number): void; declare function useErrorBoundary(cb: (error: any, errorInfo: ErrorInfo) => Promise | void): ReturnType; declare function useId(): string; declare const useEffect: typeof useEffectType; declare const useLayoutEffect: typeof useLayoutEffectType; declare const useImperativeHandle: typeof useImperativeHandleType; export { useCallback, useContext, useDebugValue, useEffect, useErrorBoundary, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, };