UNPKG

@roots/bud-server

Version:

Development server for @roots/bud

26 lines (25 loc) 687 B
import type { Payload } from '@roots/bud-server/middleware/hot'; import type { NextFunction, NextHandleFunction } from '@roots/bud-support/express'; import type { IncomingMessage, ServerResponse } from 'node:http'; export interface HotEventStream { close(): void; handler: NextHandleFunction; publish(payload: Payload): void; } /** * Hot Module Replacement event stream */ export declare class HotEventStream { /** * hmr interval Timer */ interval: NodeJS.Timeout; /** * Class constructor */ constructor(); /** * Handle update message */ handle(req: IncomingMessage, res: ServerResponse, _next?: NextFunction): void; }