Skip to content

Commit d90c53a

Browse files
authored
Merge pull request #910 from smoogly/duffel-error-headers-type
fix: specify a more precise type for DuffelError headers
2 parents 0cffd69 + 3acbe74 commit d90c53a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import fetch from 'node-fetch'
1+
import fetch, { Headers } from 'node-fetch'
22
import { URL, URLSearchParams } from 'url'
33
import {
44
DuffelResponse,
@@ -18,7 +18,7 @@ export interface Config {
1818
export class DuffelError extends Error {
1919
public meta: ApiResponseMeta
2020
public errors: ApiResponseError[]
21-
public headers: Record<string, string>
21+
public headers: Headers
2222

2323
constructor({
2424
meta,
@@ -27,7 +27,7 @@ export class DuffelError extends Error {
2727
}: {
2828
meta: ApiResponseMeta
2929
errors: ApiResponseError[]
30-
headers: Record<string, string>
30+
headers: Headers
3131
}) {
3232
super()
3333
this.meta = meta

0 commit comments

Comments
 (0)