import type { RawRequestParams } from './core'; export type MwnErrorConfig = { code: string; info?: string; html?: string; text?: string; response?: Record; 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); } /** * Returns a promise rejected with an error object * @private * @param {string} errorCode * @returns {Promise} */ export declare function rejectWithErrorCode(errorCode: string): Promise; export declare function rejectWithError(errorConfig: MwnErrorConfig | Error): Promise;