Rate this page:

WatchOptions

Methods

guard

Since ver. 5.1.0
Copy URL
guard(newValue: 

T

,
oldValue:

T

):

boolean

A function that returns a boolean to determine if the callback should be called. The guard not set by default.

Parameters

  • newValue:

    T

  • oldValue:

    T

Returns

  • type:

    boolean

Props

clearable

Copy URL
clearable: 

boolean

Whether the callback should be removed after calling the clear method. The default value is true.

immediate

Since ver. 5.1.0
Copy URL
immediate: 

boolean

Whether the callback should be called immediately after being added. The default value is false.

once

Copy URL
once: 

boolean

Whether the callback should be called only once. The default value is false.

signal

Since ver. 5.1.0
Copy URL
signal: 

AbortSignal

An AbortSignal. The watch callback will be removed when the abort() method of the AbortController which owns the AbortSignal is called. See AbortController for details.