import { StoryGetter, StoryContext } from './types'; interface Hook { name: string; memoizedState?: any; deps?: any[] | undefined; } interface Effect { create: () => (() => void) | void; destroy?: (() => void) | void; } declare type Decorator = (getStory: StoryGetter, context: StoryContext) => any; declare type AbstractFunction = (...args: any[]) => any; export declare class HooksContext { hookListsMap: WeakMap; mountedDecorators: Set; prevMountedDecorators: Set; currentHooks: Hook[]; nextHookIndex: number; currentPhase: 'MOUNT' | 'UPDATE' | 'NONE'; currentEffects: Effect[]; prevEffects: Effect[]; currentDecoratorName: string | null; hasUpdates: boolean; currentContext: StoryContext | null; renderListener: () => void; constructor(); init(): void; clean(): void; getNextHook(): Hook; triggerEffects(): void; addRenderListeners(): void; removeRenderListeners(): void; } export declare const applyHooks: (applyDecorators: (getStory: StoryGetter, decorators: Decorator[]) => StoryGetter) => (getStory: StoryGetter, decorators: Decorator[]) => (context: StoryContext) => any; export declare function useMemo(nextCreate: () => T, deps?: any[]): T; export declare function useCallback(callback: T, deps?: any[]): T; export declare function useRef(initialValue: T): { current: T; }; export declare function useState(initialState: (() => S) | S): [S, (update: ((prevState: S) => S) | S) => void]; export declare function useReducer(reducer: (state: S, action: A) => S, initialState: S): [S, (action: A) => void]; export declare function useReducer(reducer: (state: S, action: A) => S, initialArg: I, init: (initialArg: I) => S): [S, (action: A) => void]; export declare function useEffect(create: () => (() => void) | void, deps?: any[]): void; export interface Listener { (...args: any[]): void; ignorePeer?: boolean; } export interface EventMap { [eventId: string]: Listener; } export declare function useChannel(eventMap: EventMap, deps?: any[]): any; export declare function useStoryContext(): StoryContext; export declare function useParameter(parameterKey: string, defaultValue?: S): S | undefined; export {};