interface WatchOptions {
    initial?: boolean;
    once?: boolean;
    sync?: boolean;
}

Hierarchy (view full)

Properties

Properties

initial?: boolean

If true, the watch callback will be invoked immediately with the current value of the property being watched. Both the newValue and oldValue parameters will be set to the current value.

If sync is also true, the callback invoked with the initial value will be synchronous. Otherwise it will be asynchronous.

false
once?: boolean

If true, the watch callback will only be invoked once and then the remove handle will be called. If false, the watch callback will be invoked each time the watched property changes.

If sync is also true, the callback will be invoked synchronously. Otherwise it will be asynchronous.

false
sync?: boolean

If true, the watch callback will be invoked synchronously. If false, the watch callback will be invoked asynchronously.

false