We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f9a079 commit ad78a6bCopy full SHA for ad78a6b
src/index.ts
@@ -3,13 +3,21 @@ import { Fetch, FunctionInvokeOptions } from './types'
3
4
export class FunctionsClient {
5
protected url: string
6
- protected headers: { [key: string]: string }
+ protected headers: Record<string, string>
7
protected fetch: Fetch
8
9
- constructor(url: string, headers?: { [key: string]: string }, customFetch?: Fetch) {
+ constructor(
10
+ url: string,
11
+ {
12
+ headers = {},
13
+ customFetch,
14
+ }: {
15
+ headers?: Record<string, string>
16
+ customFetch?: Fetch
17
+ }
18
+ ) {
19
this.url = url
- this.headers = headers ?? {}
-
20
+ this.headers = headers
21
this.fetch = resolveFetch(customFetch)
22
}
23
0 commit comments