Home / Function/ constructor() — vue Function Reference

constructor() — vue Function Reference

Architecture documentation for the constructor() function in render-context.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  685d1f42_397c_b2cd_6dc4_8113d16b65d1["constructor()"]
  dcfd08ce_7436_881d_bd01_8b4c09f7fb5c["RenderContext"]
  685d1f42_397c_b2cd_6dc4_8113d16b65d1 -->|defined in| dcfd08ce_7436_881d_bd01_8b4c09f7fb5c
  a8cfafcc_8004_627b_30c0_b6f056df5e70["normalizeAsync()"]
  685d1f42_397c_b2cd_6dc4_8113d16b65d1 -->|calls| a8cfafcc_8004_627b_30c0_b6f056df5e70
  style 685d1f42_397c_b2cd_6dc4_8113d16b65d1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/server-renderer/src/render-context.ts lines 47–69

  constructor(options: Record<string, any>) {
    this.userContext = options.userContext
    this.activeInstance = options.activeInstance
    this.renderStates = []

    this.write = options.write
    this.done = options.done
    this.renderNode = options.renderNode

    this.isUnaryTag = options.isUnaryTag
    this.modules = options.modules
    this.directives = options.directives

    const cache = options.cache
    if (cache && (!cache.get || !cache.set)) {
      throw new Error('renderer cache must implement at least get & set.')
    }
    this.cache = cache
    this.get = cache && normalizeAsync(cache, 'get')
    this.has = cache && normalizeAsync(cache, 'has')

    this.next = this.next.bind(this)
  }

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the vue codebase, defined in packages/server-renderer/src/render-context.ts.
Where is constructor() defined?
constructor() is defined in packages/server-renderer/src/render-context.ts at line 47.
What does constructor() call?
constructor() calls 1 function(s): normalizeAsync.

Analyze Your Own Codebase

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

Try Supermodel Free