import { type FetchService } from './fetch'; import type { ServiceDescriptor } from '@conduit-client/utils'; export type MockResponse = { status?: number; statusText?: string; ok?: boolean; body?: unknown; delay?: number; }; /** * A response queued onto the mock service: either a `MockResponse` (resolved * into a synthetic `Response`) or an `Error` (rejected from the call). */ export type QueuedResponse = MockResponse | Error; export type MockFetchService = { readonly requests: Array>; readonly availableResponses: number; queueResponses: (newResponses: QueuedResponse | Array) => void; reset: () => void; readonly responsesUsed: number; } & FetchService; export declare function buildMockFetchService(initialResponses?: Array): ServiceDescriptor;