Skip to main content
Version: 4.x.x

RequestMockType


import { RequestMockType } from "@hyper-fetch/core"

Description

Defined in mocker/mocker.types.ts:3

Preview

type RequestMockType<Response> = {
config: { requestSentDuration?: number; responseDelay?: number; responseReceivedDuration?: number; status?: number | string; success?: boolean };
data: Response | Response[] | () => Response;
extra: any;
}

Structure

{
config: {
requestSentDuration: number;
responseDelay: number;
responseReceivedDuration: number;
status: number | string;
success: boolean;
};
data: Response | Response[] | () => Response;
extra: any;
}