import type { RawRequestParams } from './core';
export type MwnErrorConfig = {
    code: string;
    info?: string;
    html?: string;
    text?: string;
    response?: Record<string, unknown>;
    request?: RawRequestParams;
    disableRetry?: boolean;
};
export declare class MwnError extends Error {
    [key: string]: any;
    code?: string;
    info?: string;
    /**
     * @param {Object} config
     */
    constructor(config: Error | MwnErrorConfig);
}
export declare class MwnMissingPageError extends MwnError {
    constructor(config?: Partial<MwnErrorConfig>);
}
/**
 * Returns a promise rejected with an error object
 * @private
 * @param {string} errorCode
 * @returns {Promise}
 */
export declare function rejectWithErrorCode(errorCode: string): Promise<never>;
export declare function rejectWithError(errorConfig: MwnErrorConfig | Error): Promise<never>;
