/** * 增强版的effect * @param cb 副作用回调 * @param dep 依赖 * @param firstUpdate 第一次是否执行副作用,默认执行 */ export declare function useUdpEffect(cb: any, dep?: any, firstUpdate?: boolean): void; /** * 增强版的effect * @param cb 副作用回调 * @param dep 依赖 * @param firstUpdate 第一次是否执行副作用,默认执行 */ export declare function useUdpLayoutEffect(cb: any, dep?: any, firstUpdate?: boolean): void; /** * 监听对象属性或值变化后的副作用 * @param cb * @param obj * @param firstUpdate */ export declare function useObjectEffect(cb: any, obj: any, firstUpdate?: boolean): void; export declare function useUpdateEffect(cb: any, dep: any): void; export declare function useLayoutUpdateEffect(cb: any, dep: any): void; interface ICtx { isMounted: boolean; page?: any; } /** * 根据依赖变化同步计算数据,据说useMemo有时会重复计算,所以用此方法替代 * @param effect 计算函数 * @param deps 依赖项 * @returns 计算值 */ export declare function useCompute(effect: (...args: any[]) => T, deps: any[]): T; /** * 执行异步方法的effect * @param effect * @param deps */ export declare function useAsyncEffect(effect: (ctx: ICtx) => Promise, deps: any[]): void; export {};