Home / Class/ CodegenState Class — vue Architecture

CodegenState Class — vue Architecture

Architecture documentation for the CodegenState class in index.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  685ff2c9_ead3_5b35_ef54_60f43f93a77f["CodegenState"]
  6a18399e_553e_fef8_6a39_746f79f94bd2["index.ts"]
  685ff2c9_ead3_5b35_ef54_60f43f93a77f -->|defined in| 6a18399e_553e_fef8_6a39_746f79f94bd2
  8d6cf871_3f3d_b8f8_7e6d_b3f079b088c1["constructor()"]
  685ff2c9_ead3_5b35_ef54_60f43f93a77f -->|method| 8d6cf871_3f3d_b8f8_7e6d_b3f079b088c1

Relationship Graph

Source Code

src/compiler/codegen/index.ts lines 26–50

export class CodegenState {
  options: CompilerOptions
  warn: Function
  transforms: Array<TransformFunction>
  dataGenFns: Array<DataGenFunction>
  directives: { [key: string]: DirectiveFunction }
  maybeComponent: (el: ASTElement) => boolean
  onceId: number
  staticRenderFns: Array<string>
  pre: boolean

  constructor(options: CompilerOptions) {
    this.options = options
    this.warn = options.warn || baseWarn
    this.transforms = pluckModuleFunction(options.modules, 'transformCode')
    this.dataGenFns = pluckModuleFunction(options.modules, 'genData')
    this.directives = extend(extend({}, baseDirectives), options.directives)
    const isReservedTag = options.isReservedTag || no
    this.maybeComponent = (el: ASTElement) =>
      !!el.component || !isReservedTag(el.tag)
    this.onceId = 0
    this.staticRenderFns = []
    this.pre = false
  }
}

Domain

Frequently Asked Questions

What is the CodegenState class?
CodegenState is a class in the vue codebase, defined in src/compiler/codegen/index.ts.
Where is CodegenState defined?
CodegenState is defined in src/compiler/codegen/index.ts at line 26.

Analyze Your Own Codebase

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

Try Supermodel Free