Home / File/ index.ts — vue Source File

index.ts — vue Source File

Architecture documentation for index.ts, a typescript file in the vue codebase. 10 imports, 1 dependents.

File typescript VueCore VDom 10 imports 1 dependents 26 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  6a18399e_553e_fef8_6a39_746f79f94bd2["index.ts"]
  53156b1d_131d_a4d4_4575_daa92ec38378["events.ts"]
  6a18399e_553e_fef8_6a39_746f79f94bd2 --> 53156b1d_131d_a4d4_4575_daa92ec38378
  8ee0ad78_1765_a17a_b19d_4e3acc54fa2c["genHandlers"]
  6a18399e_553e_fef8_6a39_746f79f94bd2 --> 8ee0ad78_1765_a17a_b19d_4e3acc54fa2c
  91a91cec_898a_8a68_28b1_844eb86f59f4["index.ts"]
  6a18399e_553e_fef8_6a39_746f79f94bd2 --> 91a91cec_898a_8a68_28b1_844eb86f59f4
  84ab3997_ca97_807e_f586_e8d0a26ded10["helpers.ts"]
  6a18399e_553e_fef8_6a39_746f79f94bd2 --> 84ab3997_ca97_807e_f586_e8d0a26ded10
  90a859c5_e5d3_99dd_1caa_aad5a4ca1a74["baseWarn"]
  6a18399e_553e_fef8_6a39_746f79f94bd2 --> 90a859c5_e5d3_99dd_1caa_aad5a4ca1a74
  986757e2_2dff_4538_f36e_97457731ba01["pluckModuleFunction"]
  6a18399e_553e_fef8_6a39_746f79f94bd2 --> 986757e2_2dff_4538_f36e_97457731ba01
  101d3d34_ac07_228f_62b9_5d5ac4a0ea2e["index.ts"]
  6a18399e_553e_fef8_6a39_746f79f94bd2 --> 101d3d34_ac07_228f_62b9_5d5ac4a0ea2e
  09aa5370_2caa_6b33_3f44_6ac5211bd11b["util"]
  6a18399e_553e_fef8_6a39_746f79f94bd2 --> 09aa5370_2caa_6b33_3f44_6ac5211bd11b
  a80b8e3b_d720_9146_3bf6_594d4ee5dd77["compiler"]
  6a18399e_553e_fef8_6a39_746f79f94bd2 --> a80b8e3b_d720_9146_3bf6_594d4ee5dd77
  ef923298_cc6e_de19_be6c_0cc8a0309511["types"]
  6a18399e_553e_fef8_6a39_746f79f94bd2 --> ef923298_cc6e_de19_be6c_0cc8a0309511
  b5f71c2e_6baa_62e4_4167_0496c4d6e540["index.ts"]
  b5f71c2e_6baa_62e4_4167_0496c4d6e540 --> 6a18399e_553e_fef8_6a39_746f79f94bd2
  style 6a18399e_553e_fef8_6a39_746f79f94bd2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { genHandlers } from './events'
import baseDirectives from '../directives/index'
import { camelize, no, extend, capitalize } from 'shared/util'
import { baseWarn, pluckModuleFunction } from '../helpers'
import { emptySlotScopeToken } from '../parser/index'
import {
  ASTAttr,
  ASTDirective,
  ASTElement,
  ASTExpression,
  ASTIfConditions,
  ASTNode,
  ASTText,
  CompilerOptions
} from 'types/compiler'
import { BindingMetadata, BindingTypes } from 'sfc/types'

type TransformFunction = (el: ASTElement, code: string) => string
type DataGenFunction = (el: ASTElement) => string
type DirectiveFunction = (
  el: ASTElement,
  dir: ASTDirective,
  warn: Function
) => boolean

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
  }
}

export type CodegenResult = {
  render: string
  staticRenderFns: Array<string>
}

export function generate(
  ast: ASTElement | void,
  options: CompilerOptions
): CodegenResult {
// ... (609 more lines)

Domain

Subdomains

Classes

Imported By

Frequently Asked Questions

What does index.ts do?
index.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain, VDom subdomain.
What functions are defined in index.ts?
index.ts defines 26 function(s): checkBindingType, containsSlotChild, el, genChildren, genComment, genComponent, genData, genDirectives, genElement, genFor, and 16 more.
What does index.ts depend on?
index.ts imports 10 module(s): baseWarn, compiler, events.ts, genHandlers, helpers.ts, index.ts, index.ts, pluckModuleFunction, and 2 more.
What files import index.ts?
index.ts is imported by 1 file(s): index.ts.
Where is index.ts in the architecture?
index.ts is located at src/compiler/codegen/index.ts (domain: VueCore, subdomain: VDom, directory: src/compiler/codegen).

Analyze Your Own Codebase

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

Try Supermodel Free