static.d.ts 463 B

123456789
  1. /// <reference types="node" />
  2. import { IncomingMessage, ServerResponse } from 'http';
  3. interface UniStaticMiddlewareOptions {
  4. etag: boolean;
  5. resolve: (pathname: string) => string | void;
  6. }
  7. export type NextHandler = () => void | Promise<void>;
  8. export declare function uniStaticMiddleware(opts: UniStaticMiddlewareOptions): (req: IncomingMessage, res: ServerResponse, next: NextHandler) => void | Promise<void> | ServerResponse<IncomingMessage>;
  9. export {};