test02/node_modules/@vuepress/helper/lib/node/bundler/customizeDevServer.d.ts
罗佳鸿 6aa1ebe342
Some checks are pending
部署文档 / deploy-gh-pages (push) Waiting to run
first commit
2024-08-13 10:11:19 +08:00

27 lines
788 B
TypeScript

import type { IncomingMessage, ServerResponse } from 'node:http';
import type { App } from 'vuepress/core';
export interface DevServerOptions {
/**
* Path to be responded
*/
path: string;
/**
* Respond function
*/
response: (request: IncomingMessage, response: ServerResponse) => Promise<string | Buffer>;
/**
* error msg
*/
errMsg?: string;
}
/**
* Handle specific path when running VuePress Dev Server
*
* @param config VuePress Bundler config
* @param app VuePress Node App
* @param path Path to be responded
* @param response respond function
* @param errMsg error msg
*/
export declare const customizeDevServer: (bundlerOptions: unknown, app: App, { errMsg, response: responseHandler, path, }: DevServerOptions) => void;