state.ts — vue Source File
Architecture documentation for state.ts, a typescript file in the vue codebase. 15 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR 079339bc_f0ce_0fd0_3d1b_26a2dc073616["state.ts"] 81a11719_3457_ecad_7c86_c586d804debb["config.ts"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> 81a11719_3457_ecad_7c86_c586d804debb 093a7a23_fa4b_6464_b268_8f9d10bcaa2f["watcher.ts"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> 093a7a23_fa4b_6464_b268_8f9d10bcaa2f 6447431e_6924_8ca8_071d_44b55ba081b1["Watcher"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> 6447431e_6924_8ca8_071d_44b55ba081b1 e5c4d6ab_2495_a6d4_d962_9d9f71bf3114["dep.ts"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> e5c4d6ab_2495_a6d4_d962_9d9f71bf3114 d937f76e_061f_a631_9587_336503c9a15c["lifecycle.ts"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> d937f76e_061f_a631_9587_336503c9a15c af395f8e_1ac5_a239_71b7_fd29a1c03d2c["index.ts"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> af395f8e_1ac5_a239_71b7_fd29a1c03d2c 3f865d9f_787c_7a50_d9a7_bb5acf03eb88["set"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> 3f865d9f_787c_7a50_d9a7_bb5acf03eb88 ae862206_ea75_d74f_fad1_4801b0c9439c["del"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> ae862206_ea75_d74f_fad1_4801b0c9439c b757abbc_61ef_2454_445e_6bb830e92333["observe"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> b757abbc_61ef_2454_445e_6bb830e92333 dea83477_00f1_3c8b_f0a1_584882807d1f["defineReactive"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> dea83477_00f1_3c8b_f0a1_584882807d1f c9e94feb_048a_387e_29a1_1567a76d119c["toggleObserving"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> c9e94feb_048a_387e_29a1_1567a76d119c 76672dd6_4e87_4468_a48b_f4da793fd211["index.ts"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> 76672dd6_4e87_4468_a48b_f4da793fd211 43c3281b_9e19_70a9_3981_1b8502959f5d["apiSetup"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> 43c3281b_9e19_70a9_3981_1b8502959f5d 64c87498_c46a_6944_ab9d_8e45519852a8["component"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> 64c87498_c46a_6944_ab9d_8e45519852a8 style 079339bc_f0ce_0fd0_3d1b_26a2dc073616 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import config from '../config'
import Watcher from '../observer/watcher'
import Dep, { pushTarget, popTarget } from '../observer/dep'
import { isUpdatingChildComponent } from './lifecycle'
import { initSetup } from 'v3/apiSetup'
import {
set,
del,
observe,
defineReactive,
toggleObserving
} from '../observer/index'
import {
warn,
bind,
noop,
hasOwn,
isArray,
hyphenate,
isReserved,
handleError,
nativeWatch,
validateProp,
isPlainObject,
isServerRendering,
isReservedAttribute,
invokeWithErrorHandling,
isFunction
} from '../util/index'
import type { Component } from 'types/component'
import { shallowReactive, TrackOpTypes } from 'v3'
const sharedPropertyDefinition = {
enumerable: true,
configurable: true,
get: noop,
set: noop
}
export function proxy(target: Object, sourceKey: string, key: string) {
sharedPropertyDefinition.get = function proxyGetter() {
return this[sourceKey][key]
}
sharedPropertyDefinition.set = function proxySetter(val) {
this[sourceKey][key] = val
}
Object.defineProperty(target, key, sharedPropertyDefinition)
}
export function initState(vm: Component) {
const opts = vm.$options
if (opts.props) initProps(vm, opts.props)
// Composition API
initSetup(vm)
if (opts.methods) initMethods(vm, opts.methods)
if (opts.data) {
// ... (334 more lines)
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does state.ts do?
state.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain, Instance subdomain.
What functions are defined in state.ts?
state.ts defines 13 function(s): createComputedGetter, createGetterInvoker, createWatcher, defineComputed, getData, initComputed, initData, initMethods, initProps, initState, and 3 more.
What does state.ts depend on?
state.ts imports 15 module(s): Watcher, apiSetup, component, config.ts, defineReactive, del, dep.ts, index.ts, and 7 more.
What files import state.ts?
state.ts is imported by 3 file(s): extend.ts, index.ts, init.ts.
Where is state.ts in the architecture?
state.ts is located at src/core/instance/state.ts (domain: VueCore, subdomain: Instance, directory: src/core/instance).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free