2
0
mirror of https://git.coolaj86.com/coolaj86/request.js synced 2025-04-21 06:40:38 +00:00

update types

This commit is contained in:
Geoffrey Plitt 2023-11-21 13:47:42 -08:00
parent 982786ceae
commit 84d1095134

22
types.d.ts vendored
View File

@ -21,4 +21,26 @@ declare namespace root__request {
function put(opts: any, ...args: any[]): any;
type Headers = Record<string, string | string[]>;
interface RequestOptions {
body ?: any;
form ?: any;
headers ?: Headers;
method ?: string;
json ?: boolean | any;
url: string;
}
interface Response {
body: any;
headers: Headers;
ok: boolean;
response ?: any;
request ?: any;
status: string;
statusCode: number;
}
function Request(opts: RequestOptions): Response;
}