From fe85e35ffb7683aa04c9574501854f1ea18af40c Mon Sep 17 00:00:00 2001 From: cprayer Date: Fri, 14 Aug 2020 22:59:52 +0900 Subject: [PATCH] Fixing an issue that type 'null' and 'undefined' is not assignable to validateStatus when typescript strict option is enabled --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 74b2acd2cc..04eb30b710 100644 --- a/index.d.ts +++ b/index.d.ts @@ -62,7 +62,7 @@ export interface AxiosRequestConfig { onUploadProgress?: (progressEvent: ProgressEvent) => void; onDownloadProgress?: (progressEvent: ProgressEvent) => void; maxContentLength?: number; - validateStatus?: ((status: number) => boolean | null); + validateStatus?: ((status: number) => boolean) | null | undefined; maxBodyLength?: number; maxRedirects?: number; socketPath?: string | null;