Ejdjdososs/fable-ai
0
1import type {2 ErrorPayload,3 FullReloadPayload,4 PrunePayload,5 UpdatePayload,6} from './hmrPayload'7 8export interface CustomEventMap {9 'vite:beforeUpdate': UpdatePayload10 'vite:afterUpdate': UpdatePayload11 'vite:beforePrune': PrunePayload12 'vite:beforeFullReload': FullReloadPayload13 'vite:error': ErrorPayload14 'vite:invalidate': InvalidatePayload15 'vite:ws:connect': WebSocketConnectionPayload16 'vite:ws:disconnect': WebSocketConnectionPayload17}18 19export interface WebSocketConnectionPayload {20 /**21 * @experimental22 * We expose this instance experimentally to see potential usage.23 * This might be removed in the future if we didn't find reasonable use cases.24 * If you find this useful, please open an issue with details so we can discuss and make it stable API.25 */26 // eslint-disable-next-line n/no-unsupported-features/node-builtins27 webSocket: WebSocket28}29 30export interface InvalidatePayload {31 path: string32 message: string | undefined33}34 35/**36 * provides types for built-in Vite events37 */38export type InferCustomEventPayload<T extends string> =39 T extends keyof CustomEventMap ? CustomEventMap[T] : any40 