β¬ οΈ Back to Table of Contents
π watchTriggerable¶
π Analysis Summary¶
| Metric | Count |
|---|---|
| π§ Functions | 7 |
| π¦ Imports | 9 |
| π Interfaces | 1 |
| π Type Aliases | 2 |
π Table of Contents¶
π οΈ File Location:¶
π packages/shared/watchTriggerable/index.ts
π¦ Imports¶
| Name | Source |
|---|---|
MultiWatchSources |
vue |
WatchSource |
vue |
MapOldSources |
../utils |
MapSources |
../utils |
WatchIgnorableReturn |
../watchIgnorable |
WatchWithFilterOptions |
../watchWithFilter |
isReactive |
vue |
toValue |
vue |
watchIgnorable |
../watchIgnorable |
Functions¶
watchTriggerable(source: WatchSource<T>, cb: WatchTriggerableCallback<T, T | undefinβ¦, options: WatchWithFilterOptions<boolean>): WatchTriggerableReturn<FnReturnT>¶
Parameters:
sourceWatchSource<T>cbWatchTriggerableCallback<T, T | undefined, FnReturnT>optionsWatchWithFilterOptions<boolean>
Returns: WatchTriggerableReturn<FnReturnT>
Code
getWatchSources(sources: any): any¶
Parameters:
sourcesany
Returns: any
Calls:
isReactive (from vue)Array.isArraysources.maptoValue (from vue)
Code
getOldValue(source: any): any[]¶
Parameters:
sourceany
Returns: any[]
Calls:
Array.isArraysource.map
Code
Internal helpers¶
Declared inside another function in this file.
onEffect(): void¶
Returns: void
Calls:
fn
onCleanup(callback: () => void): void¶
Register the function cleanupFn
_cb(value: any, oldValue: any): any¶
Parameters:
valueanyoldValueany
Returns: any
Calls:
onEffectcb
Internal Comments:
Code
trigger(): any¶
Returns: any
Calls:
ignoreUpdates_cbgetWatchSourcesgetOldValue
Code
Interfaces¶
WatchTriggerableReturn<FnReturnT = void>¶
Interface Code
Properties¶
| Name | Type | Optional | Description |
|---|---|---|---|
trigger |
() => FnReturnT |
β | not shown |
Type Aliases¶
OnCleanup¶
WatchTriggerableCallback<V = any, OV = any, R = void>¶
type WatchTriggerableCallback<V = any, OV = any, R = void> = (value: V, oldValue: OV, onCleanup: OnCleanup) => R;
Generated by Syntax Scribe