@antdv/pro-utils
Version:
@antdv/pro-utils
9 lines (8 loc) • 407 B
TypeScript
import type { ComputedRef, Ref, WatchOptions } from 'vue';
type OnCleanup = (cleanupFn: () => void) => void;
type MemoUpdateFn = (prev: readonly any[], next: readonly any[], onCleanup: OnCleanup) => boolean;
interface MemoOption extends WatchOptions {
shouldUpdate?: MemoUpdateFn;
}
export declare function useMemo<T>(factory: () => T, sources: ComputedRef<any[]>, opt?: MemoOption): Ref<T>;
export {};