Urara-Blog/node_modules/.pnpm-store/v3/files/be/36a064ea9fdc9908eb717765879115c292a25a56c7d3584a514c2ece09f8b022dd389f2067f20e0f4a961198ebf9f39bafa939b751b2bd4b54b25a41f284a7
2022-08-14 01:14:53 +08:00

33 lines
921 B
Text

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[]): void
acceptExports(
exportNames: string | readonly string[],
cb: (mod: ModuleNamespace | undefined) => void
): void
dispose(cb: (data: any) => void): void
decline(): void
invalidate(): void
on<T extends string>(
event: T,
cb: (payload: InferCustomEventPayload<T>) => void
): void
send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void
}