effect.ts — vue Source File
Architecture documentation for effect.ts, a typescript file in the vue codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 069f27e9_5ae2_91da_c6c6_a92cd4436f7e["effect.ts"] 9f3b1774_ebd5_0845_1a85_868e0c1fd480["currentInstance.ts"] 069f27e9_5ae2_91da_c6c6_a92cd4436f7e --> 9f3b1774_ebd5_0845_1a85_868e0c1fd480 b0726a9b_3416_ba5e_8288_ca534387d48d["watcher"] 069f27e9_5ae2_91da_c6c6_a92cd4436f7e --> b0726a9b_3416_ba5e_8288_ca534387d48d 09aa5370_2caa_6b33_3f44_6ac5211bd11b["util"] 069f27e9_5ae2_91da_c6c6_a92cd4436f7e --> 09aa5370_2caa_6b33_3f44_6ac5211bd11b style 069f27e9_5ae2_91da_c6c6_a92cd4436f7e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Watcher from 'core/observer/watcher'
import { noop } from 'shared/util'
import { currentInstance } from '../currentInstance'
// export type EffectScheduler = (...args: any[]) => any
/**
* @internal since we are not exposing this in Vue 2, it's used only for
* internal testing.
*/
export function effect(fn: () => any, scheduler?: (cb: any) => void) {
const watcher = new Watcher(currentInstance, fn, noop, {
sync: true
})
if (scheduler) {
watcher.update = () => {
scheduler(() => watcher.run())
}
}
}
Domain
Subdomains
Functions
Dependencies
- currentInstance.ts
- util
- watcher
Source
Frequently Asked Questions
What does effect.ts do?
effect.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain, VDom subdomain.
What functions are defined in effect.ts?
effect.ts defines 1 function(s): effect.
What does effect.ts depend on?
effect.ts imports 3 module(s): currentInstance.ts, util, watcher.
Where is effect.ts in the architecture?
effect.ts is located at src/v3/reactivity/effect.ts (domain: VueCore, subdomain: VDom, directory: src/v3/reactivity).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free