This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
react-rest-request/target/endpoint.d.ts

15 lines
355 B
TypeScript
Raw Normal View History

export declare enum Method {
HEAD = "HEAD",
GET = "GET",
PUT = "PUT",
POST = "POST",
PATCH = "PATCH",
DELETE = "DELETE"
}
export declare type Endpoint<R, V, P = void> = Readonly<{
method: Method;
url: string | ((params: P) => string);
headers?: Record<string, string>;
transformResponseData?: (data: any) => R;
}>;