import InterceptRule from './InterceptRule.js'; import AbortError from './lib/AbortError.js'; export interface Options { defaultRule: InterceptRule; AbortError: typeof AbortError; bypassRedirect: boolean; } export declare type Context = { fetch: typeof fetch; }; /** * Generate the mocked fetch with given context. * Multiple arrow functions are used to bypass `.bind(this)` * which will be frequently used if not doing so. */ export default class Fetcher { private readonly options; private readonly rules; private context; private original; readonly mocked: typeof fetch; constructor(context: Context); /** * Adopt another context. Preserve active status. */ readonly adopt: (context: Context) => void; readonly remove: (rule: InterceptRule) => boolean; readonly cleanAll: () => void; readonly addRule: (input: RequestInfo | RegExp, init?: RequestInit) => InterceptRule; readonly hasActive: () => boolean; readonly isActive: () => boolean; readonly activate: () => void; readonly restore: () => void; readonly config: (config: Partial) => void; } //# sourceMappingURL=Fetcher.d.ts.map