Home / Type/ ViteHotContext Type — vite Architecture

ViteHotContext Type — vite Architecture

Architecture documentation for the ViteHotContext type/interface in hot.d.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  47f26777_5e94_ff1e_316d_c999203930fc["ViteHotContext"]
  603c1c6f_56bf_9c15_d44d_54c7564c037f["hot.d.ts"]
  47f26777_5e94_ff1e_316d_c999203930fc -->|defined in| 603c1c6f_56bf_9c15_d44d_54c7564c037f
  style 47f26777_5e94_ff1e_316d_c999203930fc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/types/hot.d.ts lines 7–39

export interface ViteHotContext {
  readonly data: any

  accept(): void
  accept(cb: (mod: ModuleNamespace | undefined) => void): void
  accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void
  accept(
    deps: readonly string[],
    cb: (mods: Array<ModuleNamespace | undefined>) => void,
  ): void

  acceptExports(
    exportNames: string | readonly string[],
    cb?: (mod: ModuleNamespace | undefined) => void,
  ): void

  dispose(cb: (data: any) => void): void
  prune(cb: (data: any) => void): void
  invalidate(message?: string): void

  on<T extends CustomEventName>(
    event: T,
    cb: (payload: InferCustomEventPayload<T>) => void,
  ): void
  off<T extends CustomEventName>(
    event: T,
    cb: (payload: InferCustomEventPayload<T>) => void,
  ): void
  send<T extends CustomEventName>(
    event: T,
    data?: InferCustomEventPayload<T>,
  ): void
}

Frequently Asked Questions

What is the ViteHotContext type?
ViteHotContext is a type/interface in the vite codebase, defined in packages/vite/types/hot.d.ts.
Where is ViteHotContext defined?
ViteHotContext is defined in packages/vite/types/hot.d.ts at line 7.

Analyze Your Own Codebase

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

Try Supermodel Free