RequestDataMockTypes
import { RequestDataMockTypes } from "@hyper-fetch/core"
Description
Defined in mocker/mocker.types.ts:18
Preview
type RequestDataMockTypes<Response,Request> = RequestMockType<Response> | RequestMockType<Response>[] | (r: Request) => RequestMockType<Response> | (r: Request) => RequestMockType<Response>[] | (r: Request) => Promise<RequestMockType<Response>> | (r: Request) => Promise<RequestMockType<Response>>[];
Structure
{config:{requestTime:number,responseTime:number,timeout:boolean,totalDownloaded:number,totalUploaded:number},data:Response | Response[] | () => Response,extra:any,status:number | string,success:boolean} | {
config: {
requestTime: number;
responseTime: number;
timeout: boolean;
totalDownloaded: number;
totalUploaded: number;
};
data: Response | Response[] | () => Response;
extra: any;
status: number | string;
success: boolean;
}[] | (r: Request) => RequestMockType<Response> | (r: Request) => RequestMockType<Response>[] | (r: Request) => Promise<RequestMockType<Response>> | (r: Request) => Promise<RequestMockType<Response>>[]