Home / File/ v3-setup-context.d.ts — vue Source File

v3-setup-context.d.ts — vue Source File

Architecture documentation for v3-setup-context.d.ts, a typescript file in the vue codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  d7be55f1_6a4a_5b61_03fd_b60243bf3590["v3-setup-context.d.ts"]
  4153c628_325c_7bd5_7f44_82467e39cbcd["./vnode"]
  d7be55f1_6a4a_5b61_03fd_b60243bf3590 --> 4153c628_325c_7bd5_7f44_82467e39cbcd
  82d5dabe_eaff_f09f_dcfe_a1f35f5cf0b1["./common"]
  d7be55f1_6a4a_5b61_03fd_b60243bf3590 --> 82d5dabe_eaff_f09f_dcfe_a1f35f5cf0b1
  dc6e3659_cdc8_9bde_c04a_3f2e10157f23["./vue"]
  d7be55f1_6a4a_5b61_03fd_b60243bf3590 --> dc6e3659_cdc8_9bde_c04a_3f2e10157f23
  style d7be55f1_6a4a_5b61_03fd_b60243bf3590 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { VNode } from './vnode'
import { Data, UnionToIntersection } from './common'
import { Vue } from './vue'

export type Slot = (...args: any[]) => VNode[]

export type Slots = Record<string, Slot | undefined>

export type ObjectEmitsOptions = Record<
  string,
  ((...args: any[]) => any) | null
>

export type EmitsOptions = ObjectEmitsOptions | string[]

export type EmitFn<
  Options = ObjectEmitsOptions,
  Event extends keyof Options = keyof Options,
  ReturnType extends void | Vue = void
> = Options extends Array<infer V>
  ? (event: V, ...args: any[]) => ReturnType
  : {} extends Options // if the emit is empty object (usually the default value for emit) should be converted to function
  ? (event: string, ...args: any[]) => ReturnType
  : UnionToIntersection<
      {
        [key in Event]: Options[key] extends (...args: infer Args) => any
          ? (event: key, ...args: Args) => ReturnType
          : (event: key, ...args: any[]) => ReturnType
      }[Event]
    >

export interface SetupContext<E extends EmitsOptions = {}> {
  attrs: Data
  /**
   * Equivalent of `this.$listeners`, which is Vue 2 only.
   */
  listeners: Record<string, Function | Function[]>
  slots: Slots
  emit: EmitFn<E>
  expose(exposed?: Record<string, any>): void
}

Domain

Subdomains

Functions

Dependencies

  • ./common
  • ./vnode
  • ./vue

Frequently Asked Questions

What does v3-setup-context.d.ts do?
v3-setup-context.d.ts is a source file in the vue codebase, written in typescript. It belongs to the CompilerSFC domain, TemplateTransformer subdomain.
What functions are defined in v3-setup-context.d.ts?
v3-setup-context.d.ts defines 2 function(s): ReturnType, args.
What does v3-setup-context.d.ts depend on?
v3-setup-context.d.ts imports 3 module(s): ./common, ./vnode, ./vue.
Where is v3-setup-context.d.ts in the architecture?
v3-setup-context.d.ts is located at types/v3-setup-context.d.ts (domain: CompilerSFC, subdomain: TemplateTransformer, directory: types).

Analyze Your Own Codebase

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

Try Supermodel Free