vue-function-api-sd
Version:
Provide logic composition capabilities for Vue.
13 lines (12 loc) • 600 B
TypeScript
import { Wrapper } from '../wrappers';
declare type watcherCallBack<T> = (newVal: T, oldVal: T) => void;
declare type watchedValue<T> = Wrapper<T> | (() => T);
declare type FlushMode = 'pre' | 'post' | 'sync';
interface WatcherOption {
lazy: boolean;
deep: boolean;
flush: FlushMode;
}
export declare function watch<T = any>(source: watchedValue<T>, cb: watcherCallBack<T>, options?: Partial<WatcherOption>): () => void;
export declare function watch<T = any>(source: Array<watchedValue<T>>, cb: watcherCallBack<T[]>, options?: Partial<WatcherOption>): () => void;
export {};