Home / Function/ resolveConstructorOptions() — vue Function Reference

resolveConstructorOptions() — vue Function Reference

Architecture documentation for the resolveConstructorOptions() function in init.ts from the vue codebase.

Function typescript CoreInstance VDOM calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  ede91bbf_a756_b9f6_cf8b_d5c2bb618503["resolveConstructorOptions()"]
  340c5746_ff29_c74c_9da5_50db2db76e5f["initMixin()"]
  340c5746_ff29_c74c_9da5_50db2db76e5f -->|calls| ede91bbf_a756_b9f6_cf8b_d5c2bb618503
  9f53d048_e9bd_bd7d_3ea7_71affe1529d8["createComponent()"]
  9f53d048_e9bd_bd7d_3ea7_71affe1529d8 -->|calls| ede91bbf_a756_b9f6_cf8b_d5c2bb618503
  a498ba2c_eab0_4620_dee1_feea597854ee["resolveModifiedOptions()"]
  ede91bbf_a756_b9f6_cf8b_d5c2bb618503 -->|calls| a498ba2c_eab0_4620_dee1_feea597854ee
  style ede91bbf_a756_b9f6_cf8b_d5c2bb618503 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/instance/init.ts lines 106–128

export function resolveConstructorOptions(Ctor: typeof Component) {
  let options = Ctor.options
  if (Ctor.super) {
    const superOptions = resolveConstructorOptions(Ctor.super)
    const cachedSuperOptions = Ctor.superOptions
    if (superOptions !== cachedSuperOptions) {
      // super option changed,
      // need to resolve new options.
      Ctor.superOptions = superOptions
      // check if there are any late-modified/attached options (#4976)
      const modifiedOptions = resolveModifiedOptions(Ctor)
      // update base extend options
      if (modifiedOptions) {
        extend(Ctor.extendOptions, modifiedOptions)
      }
      options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions)
      if (options.name) {
        options.components[options.name] = Ctor
      }
    }
  }
  return options
}

Domain

Subdomains

Frequently Asked Questions

What does resolveConstructorOptions() do?
resolveConstructorOptions() is a function in the vue codebase.
What does resolveConstructorOptions() call?
resolveConstructorOptions() calls 1 function(s): resolveModifiedOptions.
What calls resolveConstructorOptions()?
resolveConstructorOptions() is called by 2 function(s): createComponent, initMixin.

Analyze Your Own Codebase

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

Try Supermodel Free