Home / File/ index.ts — vue Source File

index.ts — vue Source File

Architecture documentation for index.ts, a typescript file in the vue codebase. 17 imports, 1 dependents.

File typescript VueCore GlobalAPI 17 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  65cf792e_a676_cf99_19ca_1e38df384bdc["index.ts"]
  81a11719_3457_ecad_7c86_c586d804debb["config.ts"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> 81a11719_3457_ecad_7c86_c586d804debb
  fbf3d1a4_d56c_d478_1573_241df479fc52["use.ts"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> fbf3d1a4_d56c_d478_1573_241df479fc52
  1b92c3a3_73b6_48be_4ce3_36ba578fb4ed["initUse"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> 1b92c3a3_73b6_48be_4ce3_36ba578fb4ed
  fb270b07_9b6b_0af1_e58c_b4cb77bdd03a["mixin.ts"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> fb270b07_9b6b_0af1_e58c_b4cb77bdd03a
  f23a491f_3cce_715d_d3ea_b4eeddbcc08d["initMixin"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> f23a491f_3cce_715d_d3ea_b4eeddbcc08d
  295edfdd_f910_fae9_5ece_4985c36859c4["extend.ts"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> 295edfdd_f910_fae9_5ece_4985c36859c4
  9a536aa5_012c_cfe5_4928_935535d711d7["initExtend"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> 9a536aa5_012c_cfe5_4928_935535d711d7
  b44eb3a4_7cb3_6229_eafe_c01a5edb54b3["assets.ts"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> b44eb3a4_7cb3_6229_eafe_c01a5edb54b3
  54f4d885_4170_983f_d5ec_565534aeadbd["initAssetRegisters"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> 54f4d885_4170_983f_d5ec_565534aeadbd
  af395f8e_1ac5_a239_71b7_fd29a1c03d2c["index.ts"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> af395f8e_1ac5_a239_71b7_fd29a1c03d2c
  3f865d9f_787c_7a50_d9a7_bb5acf03eb88["set"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> 3f865d9f_787c_7a50_d9a7_bb5acf03eb88
  ae862206_ea75_d74f_fad1_4801b0c9439c["del"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> ae862206_ea75_d74f_fad1_4801b0c9439c
  4c0d032d_003a_b195_24cf_2160ed442cf9["index.ts"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> 4c0d032d_003a_b195_24cf_2160ed442cf9
  76672dd6_4e87_4468_a48b_f4da793fd211["index.ts"]
  65cf792e_a676_cf99_19ca_1e38df384bdc --> 76672dd6_4e87_4468_a48b_f4da793fd211
  style 65cf792e_a676_cf99_19ca_1e38df384bdc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import config from '../config'
import { initUse } from './use'
import { initMixin } from './mixin'
import { initExtend } from './extend'
import { initAssetRegisters } from './assets'
import { set, del } from '../observer/index'
import { ASSET_TYPES } from 'shared/constants'
import builtInComponents from '../components/index'
import { observe } from 'core/observer/index'

import {
  warn,
  extend,
  nextTick,
  mergeOptions,
  defineReactive
} from '../util/index'
import type { GlobalAPI } from 'types/global-api'

export function initGlobalAPI(Vue: GlobalAPI) {
  // config
  const configDef: Record<string, any> = {}
  configDef.get = () => config
  if (__DEV__) {
    configDef.set = () => {
      warn(
        'Do not replace the Vue.config object, set individual fields instead.'
      )
    }
  }
  Object.defineProperty(Vue, 'config', configDef)

  // exposed util methods.
  // NOTE: these are not considered part of the public API - avoid relying on
  // them unless you are aware of the risk.
  Vue.util = {
    warn,
    extend,
    mergeOptions,
    defineReactive
  }

  Vue.set = set
  Vue.delete = del
  Vue.nextTick = nextTick

  // 2.6 explicit observable API
  Vue.observable = <T>(obj: T): T => {
    observe(obj)
    return obj
  }

  Vue.options = Object.create(null)
  ASSET_TYPES.forEach(type => {
    Vue.options[type + 's'] = Object.create(null)
  })

  // this is used to identify the "base" constructor to extend all plain-object
  // components with in Weex's multi-instance scenarios.
  Vue.options._base = Vue

  extend(Vue.options.components, builtInComponents)

  initUse(Vue)
  initMixin(Vue)
  initExtend(Vue)
  initAssetRegisters(Vue)
}

Domain

Subdomains

Functions

Imported By

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, GlobalAPI subdomain.
What functions are defined in index.ts?
index.ts defines 1 function(s): initGlobalAPI.
What does index.ts depend on?
index.ts imports 17 module(s): assets.ts, config.ts, constants, del, extend.ts, global-api, index, index.ts, and 9 more.
What files import index.ts?
index.ts is imported by 1 file(s): index.ts.
Where is index.ts in the architecture?
index.ts is located at src/core/global-api/index.ts (domain: VueCore, subdomain: GlobalAPI, directory: src/core/global-api).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free