Skip to content

Commit

Permalink
fix: Fix error due to Typescript 3.5.1
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DanielRose committed Jun 12, 2019
1 parent 8f5fec5 commit 5474f06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/infrastructure/KyRequester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function defaultRequest(service: any, { body, query, sudo, method }) {
headers,
method: (method === 'stream') ? 'get' : method,
onProgress: (method === 'stream') ? () => {} : undefined,
searchParams: stringify(decamelizeKeys(query || {}), { arrayFormat: 'bracket' }),
searchParams: stringify(decamelizeKeys(query || {}) as any, { arrayFormat: 'bracket' }),
prefixUrl: service.url,
json: typeof body === 'object' ? decamelizeKeys(body, skipAllCaps) : body,
rejectUnauthorized: service.rejectUnauthorized,
Expand Down

0 comments on commit 5474f06

Please sign in to comment.