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
  293d5bfa_b667_c8cc_f58a_fc99d479063d["CodegenState"]
  54260741_ae9d_a025_86de_47c513f5f82d["index.ts"]
  293d5bfa_b667_c8cc_f58a_fc99d479063d -->|defined in| 54260741_ae9d_a025_86de_47c513f5f82d
  aeee43e0_0a8a_79d9_e2ee_7ac935f70ab1["constructor()"]
  293d5bfa_b667_c8cc_f58a_fc99d479063d -->|method| aeee43e0_0a8a_79d9_e2ee_7ac935f70ab1

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