Home / File/ options.ts — vue Source File

options.ts — vue Source File

Architecture documentation for options.ts, a typescript file in the vue codebase. 11 imports, 0 dependents.

File typescript VueCore GlobalAPI 11 imports 15 functions

Entity Profile

Dependency Diagram

graph LR
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777["options.ts"]
  81a11719_3457_ecad_7c86_c586d804debb["config.ts"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> 81a11719_3457_ecad_7c86_c586d804debb
  4be43750_5259_d6e1_902d_9b3e2df2b9c4["debug.ts"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> 4be43750_5259_d6e1_902d_9b3e2df2b9c4
  48bc61b1_05ca_3121_50a7_2f02cdcf2f03["warn"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> 48bc61b1_05ca_3121_50a7_2f02cdcf2f03
  af395f8e_1ac5_a239_71b7_fd29a1c03d2c["index.ts"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> af395f8e_1ac5_a239_71b7_fd29a1c03d2c
  3f865d9f_787c_7a50_d9a7_bb5acf03eb88["set"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> 3f865d9f_787c_7a50_d9a7_bb5acf03eb88
  c4a53b79_1d91_2cda_05b8_fb4aee17fc5c["lang.ts"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> c4a53b79_1d91_2cda_05b8_fb4aee17fc5c
  aa2b6238_64b5_d2a0_65ca_67fd6aa3bf04["env.ts"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> aa2b6238_64b5_d2a0_65ca_67fd6aa3bf04
  09aa5370_2caa_6b33_3f44_6ac5211bd11b["util"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> 09aa5370_2caa_6b33_3f44_6ac5211bd11b
  ab8fc425_80ef_461f_288a_985447c26d02["constants"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> ab8fc425_80ef_461f_288a_985447c26d02
  64c87498_c46a_6944_ab9d_8e45519852a8["component"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> 64c87498_c46a_6944_ab9d_8e45519852a8
  3ed3b2ba_4c48_e327_9f2c_3cce3e4de21f["options"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> 3ed3b2ba_4c48_e327_9f2c_3cce3e4de21f
  style 395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import config from '../config'
import { warn } from './debug'
import { set } from '../observer/index'
import { unicodeRegExp } from './lang'
import { nativeWatch, hasSymbol } from './env'
import { isArray, isFunction } from 'shared/util'

import { ASSET_TYPES, LIFECYCLE_HOOKS } from 'shared/constants'

import {
  extend,
  hasOwn,
  camelize,
  toRawType,
  capitalize,
  isBuiltInTag,
  isPlainObject
} from 'shared/util'
import type { Component } from 'types/component'
import type { ComponentOptions } from 'types/options'

/**
 * Option overwriting strategies are functions that handle
 * how to merge a parent option value and a child option
 * value into the final value.
 */
const strats = config.optionMergeStrategies

/**
 * Options with restrictions
 */
if (__DEV__) {
  strats.el = strats.propsData = function (
    parent: any,
    child: any,
    vm: any,
    key: any
  ) {
    if (!vm) {
      warn(
        `option "${key}" can only be used during instance ` +
          'creation with the `new` keyword.'
      )
    }
    return defaultStrat(parent, child)
  }
}

/**
 * Helper that recursively merges two data objects together.
 */
function mergeData(
  to: Record<string | symbol, any>,
  from: Record<string | symbol, any> | null,
  recursive = true
): Record<PropertyKey, any> {
  if (!from) return to
  let key, toVal, fromVal

  const keys = hasSymbol
// ... (430 more lines)

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does options.ts do?
options.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 options.ts?
options.ts defines 15 function(s): assertObjectType, checkComponents, dedupeHooks, defaultStrat, mergeAssets, mergeData, mergeDataOrFn, mergeLifecycleHook, mergeOptions, normalizeDirectives, and 5 more.
What does options.ts depend on?
options.ts imports 11 module(s): component, config.ts, constants, debug.ts, env.ts, index.ts, lang.ts, options, and 3 more.
Where is options.ts in the architecture?
options.ts is located at src/core/util/options.ts (domain: VueCore, subdomain: GlobalAPI, directory: src/core/util).

Analyze Your Own Codebase

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

Try Supermodel Free