From 65087c34db1fee31ade08472f81838b36fa2cf72 Mon Sep 17 00:00:00 2001 From: Zhongpin Wang Date: Tue, 22 Oct 2024 11:25:58 +0200 Subject: [PATCH] fix: make properties partially picked --- packages/core/src/http-client.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/core/src/http-client.ts b/packages/core/src/http-client.ts index 0eb63e6c..5c73e62e 100644 --- a/packages/core/src/http-client.ts +++ b/packages/core/src/http-client.ts @@ -9,16 +9,18 @@ import type { /** * The type for parameters in custom request configuration. */ -export type CustomRequestConfig = Pick< - HttpRequestConfig, - | 'headers' - | 'params' - | 'middleware' - | 'maxContentLength' - | 'proxy' - | 'httpAgent' - | 'httpsAgent' - | 'parameterEncoder' +export type CustomRequestConfig = Partial< + Pick< + HttpRequestConfig, + | 'headers' + | 'params' + | 'middleware' + | 'maxContentLength' + | 'proxy' + | 'httpAgent' + | 'httpsAgent' + | 'parameterEncoder' + > > & Record;