1 | import { Application as ExpressApp } from "express";
|
2 | import { MockServerHelper } from "./mockServerHelper";
|
3 | import MockServerOptions from "./mockServerOptions";
|
4 | declare const webpackMockServer: {
|
5 | /**
|
6 | * Applies webpackMiddleware on existed express-application
|
7 | * @param app expressjs application that is used for mapping-routes
|
8 | * @param extendOptions MockServerOptions that overrides default options
|
9 | */
|
10 | use(app: ExpressApp, extendOptions?: MockServerOptions | undefined): void;
|
11 | /**
|
12 | * Add mock functions into webackMockServer
|
13 | * @param mockFunction
|
14 | */
|
15 | add(mockFunction: (app: ExpressApp, helper: MockServerHelper) => void): (app: ExpressApp) => void;
|
16 | /** Default MockServer options (readonly) */
|
17 | readonly defaultOptions: MockServerOptions;
|
18 | };
|
19 | export = webpackMockServer;
|
20 | declare global {
|
21 | namespace Express {
|
22 | interface Request {
|
23 | /**
|
24 | * Urls that can be used for downloading uploaded files
|
25 | * Uploading files automatically stores it's in memory
|
26 | * As alternative you can check req.file and req.files for getting file-names
|
27 | * */
|
28 | fileDownloadUrls?: string[];
|
29 | }
|
30 | namespace Multer {
|
31 | interface File {
|
32 | downloadUrl: string;
|
33 | }
|
34 | }
|
35 | }
|
36 | }
|