index.ts — vue Source File
Architecture documentation for index.ts, a typescript file in the vue codebase. 7 imports, 6 dependents.
Entity Profile
Dependency Diagram
graph LR 012c0986_6b9d_ad59_8fba_57884312dd3b["index.ts"] dfb2b3e1_ffba_6029_124e_b43a30f0f999["dep.ts"] 012c0986_6b9d_ad59_8fba_57884312dd3b --> dfb2b3e1_ffba_6029_124e_b43a30f0f999 485177ad_539e_577c_6503_821a3b761eff["Dep"] 012c0986_6b9d_ad59_8fba_57884312dd3b --> 485177ad_539e_577c_6503_821a3b761eff a13b4a2c_7af7_bcfd_03a9_13286f908ca0["vnode.ts"] 012c0986_6b9d_ad59_8fba_57884312dd3b --> a13b4a2c_7af7_bcfd_03a9_13286f908ca0 6a05321e_c7cd_43ad_21be_69c7e5fd4488["VNode"] 012c0986_6b9d_ad59_8fba_57884312dd3b --> 6a05321e_c7cd_43ad_21be_69c7e5fd4488 03e5f2e6_f71c_779b_d0d3_82c72185e473["array.ts"] 012c0986_6b9d_ad59_8fba_57884312dd3b --> 03e5f2e6_f71c_779b_d0d3_82c72185e473 2a298df2_21b8_7e5a_c372_51ba50c9d92d["index.ts"] 012c0986_6b9d_ad59_8fba_57884312dd3b --> 2a298df2_21b8_7e5a_c372_51ba50c9d92d 98ce11a0_bdf1_695f_c600_ad01581fdd0c["index.ts"] 012c0986_6b9d_ad59_8fba_57884312dd3b --> 98ce11a0_bdf1_695f_c600_ad01581fdd0c 6090fc15_0543_136f_4e4a_ce1860382ce6["index.ts"] 6090fc15_0543_136f_4e4a_ce1860382ce6 --> 012c0986_6b9d_ad59_8fba_57884312dd3b 4ac7e661_4a8f_08cb_4f7e_e4704e6ee6bd["inject.ts"] 4ac7e661_4a8f_08cb_4f7e_e4704e6ee6bd --> 012c0986_6b9d_ad59_8fba_57884312dd3b f3560440_54c1_5663_36f8_c7de54d7310b["lifecycle.ts"] f3560440_54c1_5663_36f8_c7de54d7310b --> 012c0986_6b9d_ad59_8fba_57884312dd3b 910d3a96_5984_cf85_40a3_47933bd75818["state.ts"] 910d3a96_5984_cf85_40a3_47933bd75818 --> 012c0986_6b9d_ad59_8fba_57884312dd3b 5c734a8f_efba_819c_28fc_f56bfd6b701f["options.ts"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> 012c0986_6b9d_ad59_8fba_57884312dd3b e8576a88_2e85_86ff_b2f9_bbbb6de70a51["props.ts"] e8576a88_2e85_86ff_b2f9_bbbb6de70a51 --> 012c0986_6b9d_ad59_8fba_57884312dd3b style 012c0986_6b9d_ad59_8fba_57884312dd3b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Dep from './dep'
import VNode from '../vdom/vnode'
import { arrayMethods } from './array'
import {
def,
warn,
hasOwn,
isArray,
hasProto,
isPlainObject,
isPrimitive,
isUndef,
isValidArrayIndex,
isServerRendering,
hasChanged,
noop
} from '../util/index'
import { isReadonly, isRef, TrackOpTypes, TriggerOpTypes } from '../../v3'
const arrayKeys = Object.getOwnPropertyNames(arrayMethods)
const NO_INITIAL_VALUE = {}
/**
* In some cases we may want to disable observation inside a component's
* update computation.
*/
export let shouldObserve: boolean = true
export function toggleObserving(value: boolean) {
shouldObserve = value
}
// ssr mock dep
const mockDep = {
notify: noop,
depend: noop,
addSub: noop,
removeSub: noop
} as Dep
/**
* Observer class that is attached to each observed
* object. Once attached, the observer converts the target
* object's property keys into getter/setters that
* collect dependencies and dispatch updates.
*/
export class Observer {
dep: Dep
vmCount: number // number of vms that have this object as root $data
constructor(public value: any, public shallow = false, public mock = false) {
// this.value = value
this.dep = mock ? mockDep : new Dep()
this.vmCount = 0
def(value, '__ob__', this)
if (isArray(value)) {
if (!mock) {
if (hasProto) {
/* eslint-disable no-proto */
// ... (280 more lines)
Domain
Subdomains
Classes
Imported By
Source
Frequently Asked Questions
What does index.ts do?
index.ts is a source file in the vue codebase, written in typescript. It belongs to the CoreRuntime domain, Observer subdomain.
What functions are defined in index.ts?
index.ts defines 6 function(s): defineReactive, del, dependArray, observe, set, toggleObserving.
What does index.ts depend on?
index.ts imports 7 module(s): Dep, VNode, array.ts, dep.ts, index.ts, index.ts, vnode.ts.
What files import index.ts?
index.ts is imported by 6 file(s): index.ts, inject.ts, lifecycle.ts, options.ts, props.ts, state.ts.
Where is index.ts in the architecture?
index.ts is located at src/core/observer/index.ts (domain: CoreRuntime, subdomain: Observer, directory: src/core/observer).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free