From 84d1095134c0b0d0730621c31059961fa3fa712e Mon Sep 17 00:00:00 2001 From: Geoffrey Plitt Date: Tue, 21 Nov 2023 13:47:42 -0800 Subject: [PATCH] update types --- types.d.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/types.d.ts b/types.d.ts index 11222d9..6f211d4 100644 --- a/types.d.ts +++ b/types.d.ts @@ -21,4 +21,26 @@ declare namespace root__request { function put(opts: any, ...args: any[]): any; + type Headers = Record; + + 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; }