UNPKG

@wii/fastify-webpack

Version:

fastify plugin for webpack

27 lines (26 loc) 1.13 kB
import { Stats } from 'webpack'; import { SyncEvent } from './types'; import type { IFs } from 'memfs'; import { FastifyInstance } from 'fastify'; export declare const createSyncEvents: (stats: Stats) => SyncEvent[]; type JsonObject<T = Record<string, any>> = T & { [Key in string]?: JsonValue<T>; }; type JsonValue<T> = Array<JsonValue<T>> | JsonObject<T> | boolean | number | string | null; export declare const formatServerEvent: (name: string, data: JsonObject) => string; export declare const canRead: (fs: IFs, path: string) => Promise<boolean>; type PublicPath = { outputPath: string; publicPath: string; }; export declare const getPaths: (stats: Stats) => PublicPath; export declare const getFilenameFromUrl: (fastify: FastifyInstance, outputFileSystem: IFs, stats: Stats, url: string) => Promise<string | null>; export type DeferredPromise<ValueType> = { promise: Promise<ValueType>; reject: (reason?: unknown) => void; rejected: boolean; resolve: (value?: PromiseLike<ValueType> | ValueType) => void; resolved: boolean; }; export declare const defer: <T>() => DeferredPromise<T>; export {};