storybook-addon-fake-api
Version:
This addon will send fake responses to the requests sent from your component
16 lines (15 loc) • 354 B
TypeScript
import { Method, ResponseType } from "../types";
export interface IAPI {
enabled?: boolean;
name: string;
url: string;
method: Method;
response: IAPIResponse;
}
export interface IAPIResponse {
status: number;
data: Object | Array<any>;
delay?: number;
type: ResponseType;
}
export declare type IAPIList = Array<IAPI>;