import { Configuration } from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import { MockerOption, MockerProxyRoute } from 'mocker-api';
import express from 'express';
import { ParsedArgs } from 'minimist';
import { OverridePaths } from '../overrides/paths';
export declare type MockerAPIOptions = {
    path: string | string[] | MockerProxyRoute;
    option?: MockerOption;
};
export declare type LoaderConfOptions = ParsedArgs & {
    paths: OverridePaths;
    shouldUseSourceMap: boolean;
    devServerConfigHandle?: DevServerConfigFunction;
    kktrc: KKTRC;
};
export declare type DevServerConfigFunction = (proxy: WebpackDevServer.Configuration['proxy'], allowedHost: string) => WebpackDevServer.Configuration;
export declare type DevServerOptions = ParsedArgs & Pick<LoaderConfOptions, 'paths' | 'paths'>;
export interface WebpackConfiguration extends Configuration {
    devServer?: WebpackDevServer.Configuration;
    /** Configuring the Proxy Manually */
    proxySetup?: (app: express.Application) => MockerAPIOptions;
}
export declare type KKTRC = {
    /**
     * Still available, may be removed in the future. (仍然可用，将来可能会被删除。)
     * The method has been moved elsewhere.
     * @deprecated
     *
     * The following method is recommended
     *
     * @example
     * ```ts
     * export default (conf: WebpackConfiguration, evn: 'development' | 'production') => {
     *   //....
     *   conf.proxySetup = (app: express.Application): MockerAPIOptions => {
     *     return {
     *       path: path.resolve('./mocker/index.js'),
     *     };
     *   };
     *   return conf;
     * }
     * ```
     */
    proxySetup?: (app: express.Application) => MockerAPIOptions;
    devServer?: (config: WebpackDevServer.Configuration, options: DevServerOptions) => WebpackDevServer.Configuration;
    default?: (conf: WebpackConfiguration, evn: 'development' | 'production', options: LoaderConfOptions) => WebpackConfiguration | Promise<WebpackConfiguration>;
};
export declare function loaderConf(rcPath: string): Promise<KKTRC>;
