Skip to content

wathOptions Type is not right in the Api Docs #316

@wulucxy

Description

@wulucxy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions