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 af395f8e_1ac5_a239_71b7_fd29a1c03d2c["index.ts"] e5c4d6ab_2495_a6d4_d962_9d9f71bf3114["dep.ts"] af395f8e_1ac5_a239_71b7_fd29a1c03d2c --> e5c4d6ab_2495_a6d4_d962_9d9f71bf3114 6468b0c5_2298_434f_d55a_c498376ea8cd["Dep"] af395f8e_1ac5_a239_71b7_fd29a1c03d2c --> 6468b0c5_2298_434f_d55a_c498376ea8cd 5164a61d_92b2_9c7f_8acb_b18093afdb59["vnode.ts"] af395f8e_1ac5_a239_71b7_fd29a1c03d2c --> 5164a61d_92b2_9c7f_8acb_b18093afdb59 5ad3a184_20dd_3738_991b_41d3120e21c9["VNode"] af395f8e_1ac5_a239_71b7_fd29a1c03d2c --> 5ad3a184_20dd_3738_991b_41d3120e21c9 62074bbb_3339_ba82_2975_f5cd0be2308e["array.ts"] af395f8e_1ac5_a239_71b7_fd29a1c03d2c --> 62074bbb_3339_ba82_2975_f5cd0be2308e 76672dd6_4e87_4468_a48b_f4da793fd211["index.ts"] af395f8e_1ac5_a239_71b7_fd29a1c03d2c --> 76672dd6_4e87_4468_a48b_f4da793fd211 f0fec710_9627_fe4c_002d_7f657fb9e5d0["index.ts"] af395f8e_1ac5_a239_71b7_fd29a1c03d2c --> f0fec710_9627_fe4c_002d_7f657fb9e5d0 65cf792e_a676_cf99_19ca_1e38df384bdc["index.ts"] 65cf792e_a676_cf99_19ca_1e38df384bdc --> af395f8e_1ac5_a239_71b7_fd29a1c03d2c 2951feab_0890_f54d_27c2_673dc66ea804["inject.ts"] 2951feab_0890_f54d_27c2_673dc66ea804 --> af395f8e_1ac5_a239_71b7_fd29a1c03d2c d937f76e_061f_a631_9587_336503c9a15c["lifecycle.ts"] d937f76e_061f_a631_9587_336503c9a15c --> af395f8e_1ac5_a239_71b7_fd29a1c03d2c 079339bc_f0ce_0fd0_3d1b_26a2dc073616["state.ts"] 079339bc_f0ce_0fd0_3d1b_26a2dc073616 --> af395f8e_1ac5_a239_71b7_fd29a1c03d2c 395cc6b0_6f88_f1b1_f5dd_8cdf5c229777["options.ts"] 395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> af395f8e_1ac5_a239_71b7_fd29a1c03d2c ebb0510e_1beb_0f1e_d9b5_9f9e319cefcc["props.ts"] ebb0510e_1beb_0f1e_d9b5_9f9e319cefcc --> af395f8e_1ac5_a239_71b7_fd29a1c03d2c style af395f8e_1ac5_a239_71b7_fd29a1c03d2c 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 VueCore 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: VueCore, 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