Skip to content

Commit 5474f06

Browse files
committed
fix: Fix error due to Typescript 3.5.1
decamelizeKeys is defined to return Object, but Typescript 3.5.1 is a bit stricter about Object and indexing properties. The correct fix would need to be done in the type definition of humps.
1 parent 8f5fec5 commit 5474f06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/infrastructure/KyRequester.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function defaultRequest(service: any, { body, query, sudo, method }) {
2828
headers,
2929
method: (method === 'stream') ? 'get' : method,
3030
onProgress: (method === 'stream') ? () => {} : undefined,
31-
searchParams: stringify(decamelizeKeys(query || {}), { arrayFormat: 'bracket' }),
31+
searchParams: stringify(decamelizeKeys(query || {}) as any, { arrayFormat: 'bracket' }),
3232
prefixUrl: service.url,
3333
json: typeof body === 'object' ? decamelizeKeys(body, skipAllCaps) : body,
3434
rejectUnauthorized: service.rejectUnauthorized,

0 commit comments

Comments
 (0)