Interface UseValidatorArgs<DependenciesT>

interface UseValidatorArgs<DependenciesT> {
    deps?: DependencyList;
    disabledUntil?: ReadonlyBinding<any> | BindingArrayDependencies;
    disabledWhile?: ReadonlyBinding<any> | BindingArrayDependencies;
    disabledWhileUnmodified?: ReadonlyBinding<any> | BindingArrayDependencies;
    extraFinalizationCheckers?: ((dependencyValues, dependencies, args) => TypeOrPromisedType<undefined | ValidationChecker<InferRequiredWaitableAndBindingValueTypes<DependenciesT>>>);
    id?: string;
    limitMSec?: number;
    limitMode?: LimitMode;
    limitType?: LimitType;
    priority?: number;
    queue?: RunQueue;
}

Type Parameters

  • DependenciesT extends WaitableDependencies

Hierarchy

  • LimiterOptions
    • UseValidatorArgs

Properties

deps?: DependencyList

On a rerender, deps changes are treated like hard reset bindings changes.

disabledUntil?: ReadonlyBinding<any> | BindingArrayDependencies

If specified and the values of any of the specified bindings are not truthy, the validator is disabled and so it will always result in "validity"

disabledWhile?: ReadonlyBinding<any> | BindingArrayDependencies

If specified and the values of any of the specified bindings are truthy, the validator is disabled and so it will always result in "validity"

disabledWhileUnmodified?: ReadonlyBinding<any> | BindingArrayDependencies

If any of the specified bindings are unmodified, the validator is disabled and so it will always result in "validity".

Note: if updating the modification state of these bindings without updating their values, you will need to directly call reset on this validator, or explicitly call triggerChangeListeners on the bindings, when ready to revalidate, since modification state changes on bindings don't trigger change callbacks.

extraFinalizationCheckers?: ((dependencyValues, dependencies, args) => TypeOrPromisedType<undefined | ValidationChecker<InferRequiredWaitableAndBindingValueTypes<DependenciesT>>>)

Extra validation that is only performed during finalization (see finalizeValidation)

Type declaration

id?: string

A technical, but human-readable ID, which isn't guaranteed to be unique

limitMSec?: number

The duration to debounce/throttle for

Default Value

0

limitMode?: LimitMode

The limiter mode

Default Value

'trailing'

limitType?: LimitType

The type of limiter

Default Value

'debounce'

priority?: number

The priority

Default Value

DEFAULT_PRIORITY (0)

queue?: RunQueue

The queue

Default Value

result of useDefaultQueue()

Generated using TypeDoc