the doc here:
https://vue-composition-api-rfc.netlify.app/api.html#watch
indicates WatchOptions type:
// see `watchEffect` typing for shared options
interface WatchOptions extends WatchEffectOptions {
immediate?: boolean // default: false
deep?: boolean
}
but I set immediate = false not work,so I had to explore source code:
the actual types here:
https://github.com/vuejs/composition-api/blob/master/src/apis/watch.ts#L24
it shows:
interface WatcherOption {
lazy: boolean; // whether or not to delay callcack invoking
deep: boolean;
flush: FlushMode;
}
I think this is an error in the api document