Sha256: cbe726263ae9a7bf32352380f7e8ab66ee25b3457137e316929269c19e18a2be

Contents?: true

Size: 1003 Bytes

Versions: 26

Compression:

Stored size: 1003 Bytes

Contents

import type { InferCustomEventPayload } from './customEvent'

export type ModuleNamespace = Record<string, any> & {
  [Symbol.toStringTag]: 'Module'
}

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 string>(
    event: T,
    cb: (payload: InferCustomEventPayload<T>) => void,
  ): void
  off<T extends string>(
    event: T,
    cb: (payload: InferCustomEventPayload<T>) => void,
  ): void
  send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void
}

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.25 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.24 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.23 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.22 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.21 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.20 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.19 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.18 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.17 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.16 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.15 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.14 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.13 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.12 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.11 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.10 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.9 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.8 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts
clapton-0.0.7 lib/clapton/javascripts/node_modules/vite/types/hot.d.ts