options.ts — vue Source File
Architecture documentation for options.ts, a typescript file in the vue codebase. 11 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 5c734a8f_efba_819c_28fc_f56bfd6b701f["options.ts"] d22f3dff_cc24_705a_1193_eec206dcb1d5["config.ts"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> d22f3dff_cc24_705a_1193_eec206dcb1d5 c11cafd0_9de7_a29e_a7df_dc098f20ea24["debug.ts"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> c11cafd0_9de7_a29e_a7df_dc098f20ea24 e8b22500_20a5_2e19_4c79_386004841499["warn"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> e8b22500_20a5_2e19_4c79_386004841499 012c0986_6b9d_ad59_8fba_57884312dd3b["index.ts"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> 012c0986_6b9d_ad59_8fba_57884312dd3b 30a55d4c_1b7d_ce16_2a1e_1bfee103e294["set"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> 30a55d4c_1b7d_ce16_2a1e_1bfee103e294 8e6b67c0_18f1_390e_736f_92a7d47865c6["lang.ts"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> 8e6b67c0_18f1_390e_736f_92a7d47865c6 193753e6_b34c_6e61_7eaf_22084e4e0013["env.ts"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> 193753e6_b34c_6e61_7eaf_22084e4e0013 156bf2e1_8a13_f22d_5437_54f14bcef8fa["util"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> 156bf2e1_8a13_f22d_5437_54f14bcef8fa 19d0b34b_7289_2457_32d9_273105740f2a["constants"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> 19d0b34b_7289_2457_32d9_273105740f2a 907f4994_ea28_43b1_7976_0db9f0e97637["component"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> 907f4994_ea28_43b1_7976_0db9f0e97637 71d4d16e_1e05_b2c6_a873_5b0a8828ba20["options"] 5c734a8f_efba_819c_28fc_f56bfd6b701f --> 71d4d16e_1e05_b2c6_a873_5b0a8828ba20 style 5c734a8f_efba_819c_28fc_f56bfd6b701f 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
Functions
Source
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 CoreRuntime domain, VirtualDOM 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: CoreRuntime, subdomain: VirtualDOM, directory: src/core/util).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free