index.ts — vue Source File
Architecture documentation for index.ts, a typescript file in the vue codebase. 10 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 54260741_ae9d_a025_86de_47c513f5f82d["index.ts"] 9df0c99c_7b6e_9c23_9b4e_070993bcf2a3["events.ts"] 54260741_ae9d_a025_86de_47c513f5f82d --> 9df0c99c_7b6e_9c23_9b4e_070993bcf2a3 95a7c3ac_04ed_a46b_41ce_c4ccc31c107e["genHandlers"] 54260741_ae9d_a025_86de_47c513f5f82d --> 95a7c3ac_04ed_a46b_41ce_c4ccc31c107e 16e3dbd8_b82d_6cfe_f578_20a33c4b2585["index.ts"] 54260741_ae9d_a025_86de_47c513f5f82d --> 16e3dbd8_b82d_6cfe_f578_20a33c4b2585 59b7cd33_3172_bd71_66da_0b9508449054["helpers.ts"] 54260741_ae9d_a025_86de_47c513f5f82d --> 59b7cd33_3172_bd71_66da_0b9508449054 33dc734b_e950_2417_cf6a_d52b1554e0cd["baseWarn"] 54260741_ae9d_a025_86de_47c513f5f82d --> 33dc734b_e950_2417_cf6a_d52b1554e0cd 3797286c_ee34_d7d3_7d84_b3bd41e06eaf["pluckModuleFunction"] 54260741_ae9d_a025_86de_47c513f5f82d --> 3797286c_ee34_d7d3_7d84_b3bd41e06eaf 320ee0f4_351d_a6b2_1c1c_f0f6f42fb987["index.ts"] 54260741_ae9d_a025_86de_47c513f5f82d --> 320ee0f4_351d_a6b2_1c1c_f0f6f42fb987 156bf2e1_8a13_f22d_5437_54f14bcef8fa["util"] 54260741_ae9d_a025_86de_47c513f5f82d --> 156bf2e1_8a13_f22d_5437_54f14bcef8fa 47ae9f26_59d1_fab2_349f_966f5d15495a["compiler"] 54260741_ae9d_a025_86de_47c513f5f82d --> 47ae9f26_59d1_fab2_349f_966f5d15495a 1eb2f1f6_ab9d_0f9b_7050_d8d983ed4e04["types"] 54260741_ae9d_a025_86de_47c513f5f82d --> 1eb2f1f6_ab9d_0f9b_7050_d8d983ed4e04 444dc0ac_813b_2552_2920_d8cccb96280b["index.ts"] 444dc0ac_813b_2552_2920_d8cccb96280b --> 54260741_ae9d_a025_86de_47c513f5f82d style 54260741_ae9d_a025_86de_47c513f5f82d 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
Functions
- checkBindingType()
- containsSlotChild()
- el()
- genChildren()
- genComment()
- genComponent()
- genData()
- genDirectives()
- genElement()
- genFor()
- genIf()
- genIfConditions()
- genInlineTemplate()
- genNode()
- genOnce()
- genProps()
- genScopedSlot()
- genScopedSlots()
- genSlot()
- genStatic()
- genText()
- generate()
- getNormalizationType()
- hash()
- needsNormalization()
- transformSpecialNewlines()
Classes
Dependencies
Imported By
Source
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 CompilerSFC domain, ScriptAnalyzer 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: CompilerSFC, subdomain: ScriptAnalyzer, directory: src/compiler/codegen).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free