UNPKG

stable-ts-type

Version:

Obtain the most stable type code of 'typescript' through multiple network requests

16 lines (15 loc) 635 B
import type { AxiosRequestConfig } from "axios"; export declare type Input = RequestInput | ExampleJSONInput; export declare type RequestMock = Partial<Record<'data' | 'params', any>>; export declare type RequestInput = { type: 'request'; value: AxiosRequestConfig | string; mockCount?: number; mock?: RequestMock; }; export declare type ExampleJSONInput = { type: 'example-json'; value: Record<string, any> | string; }; /** 多次mock的Input拆成多个一次的Input */ export declare const getOnceMockInputList: <InnerInput extends Input>(inputs: InnerInput[], sort?: 'random' | 'regular') => InnerInput[];