Home / File/ types.ts — vue Source File

types.ts — vue Source File

Architecture documentation for types.ts, a typescript file in the vue codebase. 3 imports, 9 dependents.

File typescript SfcCompiler 3 imports 9 dependents

Entity Profile

Dependency Diagram

graph LR
  1a27e6b3_7515_332e_8d02_d958c72a568c["types.ts"]
  0efbfda6_f2a2_633c_6405_ea7a32c8a88d["parseComponent.ts"]
  1a27e6b3_7515_332e_8d02_d958c72a568c --> 0efbfda6_f2a2_633c_6405_ea7a32c8a88d
  12e2cd32_caec_3647_52d2_fbf5316b83b2["SFCDescriptor"]
  1a27e6b3_7515_332e_8d02_d958c72a568c --> 12e2cd32_caec_3647_52d2_fbf5316b83b2
  a80b8e3b_d720_9146_3bf6_594d4ee5dd77["compiler"]
  1a27e6b3_7515_332e_8d02_d958c72a568c --> a80b8e3b_d720_9146_3bf6_594d4ee5dd77
  c9346cac_54e3_f6ca_68a7_03c6e82c9609["compileScript.ts"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> 1a27e6b3_7515_332e_8d02_d958c72a568c
  b824bd73_da14_5076_9939_3d47171265ea["compileTemplate.ts"]
  b824bd73_da14_5076_9939_3d47171265ea --> 1a27e6b3_7515_332e_8d02_d958c72a568c
  445bc304_0400_2ae2_a33b_eaa1d5e1788a["cssVars.ts"]
  445bc304_0400_2ae2_a33b_eaa1d5e1788a --> 1a27e6b3_7515_332e_8d02_d958c72a568c
  a74639a8_41f7_d409_723a_4c6194e0c72d["parse.ts"]
  a74639a8_41f7_d409_723a_4c6194e0c72d --> 1a27e6b3_7515_332e_8d02_d958c72a568c
  0efbfda6_f2a2_633c_6405_ea7a32c8a88d["parseComponent.ts"]
  0efbfda6_f2a2_633c_6405_ea7a32c8a88d --> 1a27e6b3_7515_332e_8d02_d958c72a568c
  472584c7_15d2_7ac4_2300_5c0fac3bab21["prefixIdentifiers.ts"]
  472584c7_15d2_7ac4_2300_5c0fac3bab21 --> 1a27e6b3_7515_332e_8d02_d958c72a568c
  e91c3191_e713_5a24_f1a5_0b0a82abbda9["compileScript.spec.ts"]
  e91c3191_e713_5a24_f1a5_0b0a82abbda9 --> 1a27e6b3_7515_332e_8d02_d958c72a568c
  274291c3_092c_9022_0cef_c4d2708cc615["prefixIdentifiers.spec.ts"]
  274291c3_092c_9022_0cef_c4d2708cc615 --> 1a27e6b3_7515_332e_8d02_d958c72a568c
  1ce15a60_e704_f44b_e133_a9ef736678fc["codegen.spec.ts"]
  1ce15a60_e704_f44b_e133_a9ef736678fc --> 1a27e6b3_7515_332e_8d02_d958c72a568c
  style 1a27e6b3_7515_332e_8d02_d958c72a568c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { CompilerOptions, CompiledResult } from 'types/compiler'
import { SFCDescriptor } from './parseComponent'

export interface StartOfSourceMap {
  file?: string
  sourceRoot?: string
}

export interface RawSourceMap extends StartOfSourceMap {
  version: string
  sources: string[]
  names: string[]
  sourcesContent?: string[]
  mappings: string
}

export interface TemplateCompiler {
  parseComponent(source: string, options?: any): SFCDescriptor
  compile(template: string, options: CompilerOptions): CompiledResult
  ssrCompile(template: string, options: CompilerOptions): CompiledResult
}

export const enum BindingTypes {
  /**
   * returned from data()
   */
  DATA = 'data',
  /**
   * declared as a prop
   */
  PROPS = 'props',
  /**
   * a local alias of a `<script setup>` destructured prop.
   * the original is stored in __propsAliases of the bindingMetadata object.
   */
  PROPS_ALIASED = 'props-aliased',
  /**
   * a let binding (may or may not be a ref)
   */
  SETUP_LET = 'setup-let',
  /**
   * a const binding that can never be a ref.
   * these bindings don't need `unref()` calls when processed in inlined
   * template expressions.
   */
  SETUP_CONST = 'setup-const',
  /**
   * a const binding that does not need `unref()`, but may be mutated.
   */
  SETUP_REACTIVE_CONST = 'setup-reactive-const',
  /**
   * a const binding that may be a ref.
   */
  SETUP_MAYBE_REF = 'setup-maybe-ref',
  /**
   * bindings that are guaranteed to be refs
   */
  SETUP_REF = 'setup-ref',
  /**
   * declared by other options, e.g. computed, inject
   */
  OPTIONS = 'options'
}

export type BindingMetadata = {
  [key: string]: BindingTypes | undefined
} & {
  __isScriptSetup?: boolean
}

Domain

Dependencies

Frequently Asked Questions

What does types.ts do?
types.ts is a source file in the vue codebase, written in typescript. It belongs to the SfcCompiler domain.
What does types.ts depend on?
types.ts imports 3 module(s): SFCDescriptor, compiler, parseComponent.ts.
What files import types.ts?
types.ts is imported by 9 file(s): codegen.spec.ts, compileScript.spec.ts, compileScript.ts, compileTemplate.ts, cssVars.ts, parse.ts, parseComponent.ts, prefixIdentifiers.spec.ts, and 1 more.
Where is types.ts in the architecture?
types.ts is located at packages/compiler-sfc/src/types.ts (domain: SfcCompiler, directory: packages/compiler-sfc/src).

Analyze Your Own Codebase

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

Try Supermodel Free