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 {
1818 #legacy: boolean
1919
2020 constructor ( apiKeyOrOptions : string | SeamHttpOptions ) {
21- const options = parseOptions (
22- typeof apiKeyOrOptions === 'string'
23- ? { apiKey : apiKeyOrOptions }
24- : apiKeyOrOptions ,
25- )
26-
21+ const options = parseOptions ( apiKeyOrOptions )
2722 this . #legacy = options . enableLegacyMethodBehaivor
2823
2924 // TODO: axiosRetry? Allow options to configure this if so
@@ -78,7 +73,14 @@ export class SeamHttp {
7873 }
7974}
8075
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+
8284 const endpoint =
8385 options . endpoint ??
8486 globalThis . process ?. env ?. [ 'SEAM_ENDPOINT' ] ??
You can’t perform that action at this time.
0 commit comments