init.ts — vue Source File
Architecture documentation for init.ts, a typescript file in the vue codebase. 22 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR ae790ceb_073b_1bcf_331c_af2d587c1ad6["init.ts"] 81a11719_3457_ecad_7c86_c586d804debb["config.ts"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> 81a11719_3457_ecad_7c86_c586d804debb 581d7f4f_49fe_9174_eacc_5863a2fab073["proxy.ts"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> 581d7f4f_49fe_9174_eacc_5863a2fab073 8456f6f9_fac5_bded_b12e_00d134623933["initProxy"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> 8456f6f9_fac5_bded_b12e_00d134623933 079339bc_f0ce_0fd0_3d1b_26a2dc073616["state.ts"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> 079339bc_f0ce_0fd0_3d1b_26a2dc073616 ff5d1d58_05a4_1c98_682b_8814ac1fe9fd["initState"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> ff5d1d58_05a4_1c98_682b_8814ac1fe9fd 2c65c43e_4691_415f_689a_805ec38ae46c["render.ts"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> 2c65c43e_4691_415f_689a_805ec38ae46c bdbcb4df_444f_38c6_ba9d_20ef23f9091f["initRender"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> bdbcb4df_444f_38c6_ba9d_20ef23f9091f 8c1ef0ac_57c2_7f8a_7ea7_6924e38bf16b["events.ts"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> 8c1ef0ac_57c2_7f8a_7ea7_6924e38bf16b b5467571_ff24_3513_9196_5f6c9ff68844["initEvents"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> b5467571_ff24_3513_9196_5f6c9ff68844 f4608dd9_26eb_0122_6979_8fe915792d8a["perf.ts"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> f4608dd9_26eb_0122_6979_8fe915792d8a 52e70123_85d8_4258_eaf3_a7a0731a5968["mark"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> 52e70123_85d8_4258_eaf3_a7a0731a5968 51edb677_f952_7062_365b_064cd93a29f4["measure"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> 51edb677_f952_7062_365b_064cd93a29f4 d937f76e_061f_a631_9587_336503c9a15c["lifecycle.ts"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> d937f76e_061f_a631_9587_336503c9a15c 1b5974c6_1385_a2dc_0c7c_8cc8c4210866["initLifecycle"] ae790ceb_073b_1bcf_331c_af2d587c1ad6 --> 1b5974c6_1385_a2dc_0c7c_8cc8c4210866 style ae790ceb_073b_1bcf_331c_af2d587c1ad6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import config from '../config'
import { initProxy } from './proxy'
import { initState } from './state'
import { initRender } from './render'
import { initEvents } from './events'
import { mark, measure } from '../util/perf'
import { initLifecycle, callHook } from './lifecycle'
import { initProvide, initInjections } from './inject'
import { extend, mergeOptions, formatComponentName } from '../util/index'
import type { Component } from 'types/component'
import type { InternalComponentOptions } from 'types/options'
import { EffectScope } from 'v3/reactivity/effectScope'
let uid = 0
export function initMixin(Vue: typeof Component) {
Vue.prototype._init = function (options?: Record<string, any>) {
const vm: Component = this
// a uid
vm._uid = uid++
let startTag, endTag
/* istanbul ignore if */
if (__DEV__ && config.performance && mark) {
startTag = `vue-perf-start:${vm._uid}`
endTag = `vue-perf-end:${vm._uid}`
mark(startTag)
}
// a flag to mark this as a Vue instance without having to do instanceof
// check
vm._isVue = true
// avoid instances from being observed
vm.__v_skip = true
// effect scope
vm._scope = new EffectScope(true /* detached */)
// #13134 edge case where a child component is manually created during the
// render of a parent component
vm._scope.parent = undefined
vm._scope._vm = true
// merge options
if (options && options._isComponent) {
// optimize internal component instantiation
// since dynamic options merging is pretty slow, and none of the
// internal component options needs special treatment.
initInternalComponent(vm, options as any)
} else {
vm.$options = mergeOptions(
resolveConstructorOptions(vm.constructor as any),
options || {},
vm
)
}
/* istanbul ignore else */
if (__DEV__) {
initProxy(vm)
} else {
vm._renderProxy = vm
}
// expose real self
// ... (84 more lines)
Domain
Subdomains
Dependencies
Imported By
Source
Frequently Asked Questions
What does init.ts do?
init.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 init.ts?
init.ts defines 4 function(s): initInternalComponent, initMixin, resolveConstructorOptions, resolveModifiedOptions.
What does init.ts depend on?
init.ts imports 22 module(s): callHook, component, config.ts, effectScope, events.ts, index.ts, initEvents, initInjections, and 14 more.
What files import init.ts?
init.ts is imported by 1 file(s): index.ts.
Where is init.ts in the architecture?
init.ts is located at src/core/instance/init.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