Skip to content

Commit 9f31d20

Browse files
committed
feat: fix types
1 parent b746440 commit 9f31d20

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/create-http-client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { AxiosRequestHeaders, AxiosStatic } from 'axios'
1+
import { AxiosRequestHeaders } from 'axios'
2+
import type { AxiosStatic } from 'axios'
23
import copy from 'fast-copy'
34
import qs from 'qs'
45
import asyncToken from './async-token'

src/types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
2-
import { AxiosRequestHeaders, InternalAxiosRequestConfig } from 'axios'
2+
import { AxiosHeaderValue, AxiosRequestHeaders, InternalAxiosRequestConfig } from 'axios'
33

44
import type {
55
AxiosInstance as OriginalAxiosInstance,
@@ -64,7 +64,7 @@ export type CreateHttpClientParams = {
6464
logHandler?: DefaultOptions['logHandler']
6565

6666
/** Optional additional headers */
67-
headers?: AxiosRequestHeaders
67+
headers?: AxiosRequestHeaders | Record<string, AxiosHeaderValue>
6868

6969
defaultHostname?: string
7070

@@ -122,7 +122,7 @@ export type ContentfulErrorData = {
122122
statusText?: string
123123
requestId?: string
124124
message: string
125-
details: Record<string, unknown>
126-
request?: Record<string, unknown>
125+
details: Record<string, any>
126+
request?: Record<string, any>
127127
sys?: { id?: string }
128128
}

0 commit comments

Comments
 (0)