apiWatch.ts — vue Source File
Architecture documentation for apiWatch.ts, a typescript file in the vue codebase. 17 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 38aa88fe_678d_7728_4258_240bdb85b32b["apiWatch.ts"] ada43310_8d32_ee2a_f18b_1e24fd4f8a1d["ref.ts"] 38aa88fe_678d_7728_4258_240bdb85b32b --> ada43310_8d32_ee2a_f18b_1e24fd4f8a1d 64ef09a1_8484_35c7_6154_30d045c3ca15["isRef"] 38aa88fe_678d_7728_4258_240bdb85b32b --> 64ef09a1_8484_35c7_6154_30d045c3ca15 b2dbf772_f39b_f942_7a94_3bc9c73b0a11["Ref"] 38aa88fe_678d_7728_4258_240bdb85b32b --> b2dbf772_f39b_f942_7a94_3bc9c73b0a11 50bb6353_35b0_d08f_72d3_b5e73e75dfee["computed.ts"] 38aa88fe_678d_7728_4258_240bdb85b32b --> 50bb6353_35b0_d08f_72d3_b5e73e75dfee d67bf390_6ca9_6cca_6859_913240141b88["ComputedRef"] 38aa88fe_678d_7728_4258_240bdb85b32b --> d67bf390_6ca9_6cca_6859_913240141b88 abfe3078_bfec_252c_2107_7cdf0dd06f08["reactive.ts"] 38aa88fe_678d_7728_4258_240bdb85b32b --> abfe3078_bfec_252c_2107_7cdf0dd06f08 998575fc_6104_64df_b366_9135ccd9e5f9["isReactive"] 38aa88fe_678d_7728_4258_240bdb85b32b --> 998575fc_6104_64df_b366_9135ccd9e5f9 4dec4402_504f_d778_cdf1_34adb751a2fb["isShallow"] 38aa88fe_678d_7728_4258_240bdb85b32b --> 4dec4402_504f_d778_cdf1_34adb751a2fb 08d717e5_b9dd_701c_e7a2_51d83681d28a["currentInstance.ts"] 38aa88fe_678d_7728_4258_240bdb85b32b --> 08d717e5_b9dd_701c_e7a2_51d83681d28a acd39cb4_1b40_1f96_d7d8_00ba7dc7b283["watcher.ts"] 38aa88fe_678d_7728_4258_240bdb85b32b --> acd39cb4_1b40_1f96_d7d8_00ba7dc7b283 e7f4f452_deed_8a48_b501_c415a06a6251["Watcher"] 38aa88fe_678d_7728_4258_240bdb85b32b --> e7f4f452_deed_8a48_b501_c415a06a6251 7cc5a667_1876_f28e_e26f_27fcdcba292e["scheduler.ts"] 38aa88fe_678d_7728_4258_240bdb85b32b --> 7cc5a667_1876_f28e_e26f_27fcdcba292e 331094c1_856e_230e_e56a_5500d0a6236f["queueWatcher"] 38aa88fe_678d_7728_4258_240bdb85b32b --> 331094c1_856e_230e_e56a_5500d0a6236f 304b1edc_7b13_538e_3309_079eb06f0a14["debug.ts"] 38aa88fe_678d_7728_4258_240bdb85b32b --> 304b1edc_7b13_538e_3309_079eb06f0a14 style 38aa88fe_678d_7728_4258_240bdb85b32b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { isRef, Ref } from './reactivity/ref'
import { ComputedRef } from './reactivity/computed'
import { isReactive, isShallow } from './reactivity/reactive'
import {
warn,
noop,
isArray,
isFunction,
emptyObject,
hasChanged,
isServerRendering,
invokeWithErrorHandling
} from 'core/util'
import { currentInstance } from './currentInstance'
import { traverse } from 'core/observer/traverse'
import Watcher from '../core/observer/watcher'
import { queueWatcher } from '../core/observer/scheduler'
import { DebuggerOptions } from './debug'
const WATCHER = `watcher`
const WATCHER_CB = `${WATCHER} callback`
const WATCHER_GETTER = `${WATCHER} getter`
const WATCHER_CLEANUP = `${WATCHER} cleanup`
export type WatchEffect = (onCleanup: OnCleanup) => void
export type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T)
export type WatchCallback<V = any, OV = any> = (
value: V,
oldValue: OV,
onCleanup: OnCleanup
) => any
type MapSources<T, Immediate> = {
[K in keyof T]: T[K] extends WatchSource<infer V>
? Immediate extends true
? V | undefined
: V
: T[K] extends object
? Immediate extends true
? T[K] | undefined
: T[K]
: never
}
type OnCleanup = (cleanupFn: () => void) => void
export interface WatchOptionsBase extends DebuggerOptions {
flush?: 'pre' | 'post' | 'sync'
}
export interface WatchOptions<Immediate = boolean> extends WatchOptionsBase {
immediate?: Immediate
deep?: boolean
}
export type WatchStopHandle = () => void
// Simple effect.
// ... (294 more lines)
Domain
Subdomains
Functions
Types
Dependencies
Source
Frequently Asked Questions
What does apiWatch.ts do?
apiWatch.ts is a source file in the vue codebase, written in typescript. It belongs to the CompilerSFC domain, ScriptAnalyzer subdomain.
What functions are defined in apiWatch.ts?
apiWatch.ts defines 9 function(s): T, cleanupFn, doWatch, onCleanup, value, watch, watchEffect, watchPostEffect, watchSyncEffect.
What does apiWatch.ts depend on?
apiWatch.ts imports 17 module(s): ComputedRef, DebuggerOptions, Ref, Watcher, computed.ts, currentInstance.ts, debug.ts, isReactive, and 9 more.
Where is apiWatch.ts in the architecture?
apiWatch.ts is located at src/v3/apiWatch.ts (domain: CompilerSFC, subdomain: ScriptAnalyzer, directory: src/v3).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free