From 038cb7a0284eee768228b8c279e7f0e285ba312c Mon Sep 17 00:00:00 2001 From: Jan Chren ~rindeal Date: Mon, 9 Sep 2024 05:23:38 +0000 Subject: [PATCH] fix(types): add missing `cache` prop to RequestInit Also sort the props. See: https://github.com/nodejs/undici/blob/dca0aa0998cbdef28916b23d6300beb2fd979140/lib/web/fetch/request.js#L974-L979 --- types/fetch.d.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/types/fetch.d.ts b/types/fetch.d.ts index 7c2b1c98ccd..4edf41eb055 100644 --- a/types/fetch.d.ts +++ b/types/fetch.d.ts @@ -119,20 +119,21 @@ type RequestDestination = | 'xslt' export interface RequestInit { - method?: string - keepalive?: boolean - headers?: HeadersInit body?: BodyInit | null - redirect?: RequestRedirect - integrity?: string - signal?: AbortSignal | null + cache?: RequestCache credentials?: RequestCredentials + dispatcher?: Dispatcher + duplex?: RequestDuplex + headers?: HeadersInit + integrity?: string + keepalive?: boolean + method?: string mode?: RequestMode + redirect?: RequestRedirect referrer?: string referrerPolicy?: ReferrerPolicy + signal?: AbortSignal | null window?: null - dispatcher?: Dispatcher - duplex?: RequestDuplex } export type ReferrerPolicy =