File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,7 @@ export class SeamHttp {
18
18
#legacy: boolean
19
19
20
20
constructor ( apiKeyOrOptions : string | SeamHttpOptions ) {
21
- const options = parseOptions (
22
- typeof apiKeyOrOptions === 'string'
23
- ? { apiKey : apiKeyOrOptions }
24
- : apiKeyOrOptions ,
25
- )
26
-
21
+ const options = parseOptions ( apiKeyOrOptions )
27
22
this . #legacy = options . enableLegacyMethodBehaivor
28
23
29
24
// TODO: axiosRetry? Allow options to configure this if so
@@ -78,7 +73,14 @@ export class SeamHttp {
78
73
}
79
74
}
80
75
81
- const parseOptions = ( options : SeamHttpOptions ) : Required < SeamHttpOptions > => {
76
+ const parseOptions = (
77
+ apiKeyOrOptions : string | SeamHttpOptions ,
78
+ ) : Required < SeamHttpOptions > => {
79
+ const options =
80
+ typeof apiKeyOrOptions === 'string'
81
+ ? { apiKey : apiKeyOrOptions }
82
+ : apiKeyOrOptions
83
+
82
84
const endpoint =
83
85
options . endpoint ??
84
86
globalThis . process ?. env ?. [ 'SEAM_ENDPOINT' ] ??
You can’t perform that action at this time.
0 commit comments