Home / File/ options.ts — vue Source File

options.ts — vue Source File

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

File typescript VueCore VDom 5 imports 1 dependents 3 functions

Entity Profile

Dependency Diagram

graph LR
  99480f1a_03a1_34c3_490d_e25f87285c5f["options.ts"]
  ba29f985_44b7_4ac5_07cd_a4e17537349a["component.ts"]
  99480f1a_03a1_34c3_490d_e25f87285c5f --> ba29f985_44b7_4ac5_07cd_a4e17537349a
  cd5e3304_b18e_ac2d_84bc_fcd7b8e076cd["Component"]
  99480f1a_03a1_34c3_490d_e25f87285c5f --> cd5e3304_b18e_ac2d_84bc_fcd7b8e076cd
  973389ac_8625_30a3_53ce_b1b48fae58c5["vnode"]
  99480f1a_03a1_34c3_490d_e25f87285c5f --> 973389ac_8625_30a3_53ce_b1b48fae58c5
  24bdbf1b_c076_fe3e_ac9f_bb7aa065c8d7["debug"]
  99480f1a_03a1_34c3_490d_e25f87285c5f --> 24bdbf1b_c076_fe3e_ac9f_bb7aa065c8d7
  43c3281b_9e19_70a9_3981_1b8502959f5d["apiSetup"]
  99480f1a_03a1_34c3_490d_e25f87285c5f --> 43c3281b_9e19_70a9_3981_1b8502959f5d
  ba29f985_44b7_4ac5_07cd_a4e17537349a["component.ts"]
  ba29f985_44b7_4ac5_07cd_a4e17537349a --> 99480f1a_03a1_34c3_490d_e25f87285c5f
  style 99480f1a_03a1_34c3_490d_e25f87285c5f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import VNode from 'core/vdom/vnode'
import { DebuggerEvent } from 'v3/debug'
import { SetupContext } from 'v3/apiSetup'
import { Component } from './component'

export type InternalComponentOptions = {
  _isComponent: true
  parent: Component
  _parentVnode: VNode
  render?: Function
  staticRenderFns?: Array<Function>
}

type InjectKey = string | Symbol

/**
 * @internal
 */
export type ComponentOptions = {
  // v3
  setup?: (props: Record<string, any>, ctx: SetupContext) => unknown

  [key: string]: any

  componentId?: string

  // data
  data: object | Function | void
  props?:
    | string[]
    | Record<string, Function | Array<Function> | null | PropOptions>
  propsData?: object
  computed?: {
    [key: string]:
      | Function
      | {
          get?: Function
          set?: Function
          cache?: boolean
        }
  }
  methods?: { [key: string]: Function }
  watch?: { [key: string]: Function | string }

  // DOM
  el?: string | Element
  template?: string
  render: (h: () => VNode) => VNode
  renderError?: (h: () => VNode, err: Error) => VNode
  staticRenderFns?: Array<() => VNode>

  // lifecycle
  beforeCreate?: Function
  created?: Function
  beforeMount?: Function
  mounted?: Function
  beforeUpdate?: Function
  updated?: Function
  activated?: Function
  deactivated?: Function
  beforeDestroy?: Function
  destroyed?: Function
  errorCaptured?: () => boolean | void
  serverPrefetch?: Function
  renderTracked?(e: DebuggerEvent): void
  renderTriggerd?(e: DebuggerEvent): void

  // assets
  directives?: { [key: string]: object }
  components?: { [key: string]: Component }
  transitions?: { [key: string]: object }
  filters?: { [key: string]: Function }

  // context
  provide?: Record<string | symbol, any> | (() => Record<string | symbol, any>)
  inject?:
    | { [key: string]: InjectKey | { from?: InjectKey; default?: any } }
    | Array<string>

  // component v-model customization
  model?: {
    prop?: string
    event?: string
  }

  // misc
  parent?: Component
  mixins?: Array<object>
  name?: string
  extends?: Component | object
  delimiters?: [string, string]
  comments?: boolean
  inheritAttrs?: boolean

  // Legacy API
  abstract?: any

  // private
  _isComponent?: true
  _propKeys?: Array<string>
  _parentVnode?: VNode
  _parentListeners?: object | null
  _renderChildren?: Array<VNode> | null
  _componentTag: string | null
  _scopeId: string | null
  _base: typeof Component
}

export type PropOptions = {
  type?: Function | Array<Function> | null
  default?: any
  required?: boolean | null
  validator?: Function | null
}

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does options.ts do?
options.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 options.ts?
options.ts defines 3 function(s): Record, VNode, props.
What does options.ts depend on?
options.ts imports 5 module(s): Component, apiSetup, component.ts, debug, vnode.
What files import options.ts?
options.ts is imported by 1 file(s): component.ts.
Where is options.ts in the architecture?
options.ts is located at src/types/options.ts (domain: VueCore, subdomain: VDom, directory: src/types).

Analyze Your Own Codebase

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

Try Supermodel Free