Skip to content

Commit 7c3e2a7

Browse files
committed
Move api config to constructor argument
1 parent af8be5c commit 7c3e2a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/api.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class API {
4141
private readonly enterprise: boolean
4242
private readonly _fetch: nodeFetchType
4343

44-
constructor() {
45-
const {serverUrl, cookiePath, enterprise}: APIOptions = config
44+
constructor(config: APIOptions) {
45+
const {serverUrl, cookiePath, enterprise} = config
4646

4747
fs.ensureFileSync(cookiePath)
4848

@@ -194,4 +194,4 @@ class API {
194194

195195
export default API
196196

197-
export const APIClient = new API()
197+
export const APIClient = new API(config)

0 commit comments

Comments
 (0)