diff --git a/package-lock.json b/package-lock.json index 0f179ff8..919a6639 100644 --- a/package-lock.json +++ b/package-lock.json @@ -302,6 +302,12 @@ "integrity": "sha1-EYHsvh2XtwNODqHjXmLobMJrQi0=", "dev": true }, + "@types/util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-JK7Ecs9ETHfYSoG5ZILe30Ar9fmMT7vZTirfZQQ9OAZDB8TfPVV6aQkYPtfx2MFfB+yrSY4jCfrvMdemv/9VHw==", + "dev": true + }, "JSONStream": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.4.tgz", diff --git a/src/infrastructure/BaseService.ts b/src/infrastructure/BaseService.ts index dfcb6072..39af0ff3 100644 --- a/src/infrastructure/BaseService.ts +++ b/src/infrastructure/BaseService.ts @@ -16,11 +16,11 @@ export type BaseModelContructorOptions = | BaseModelOptions & Required> | BaseModelOptions & Required>; class BaseModel { - protected url: string; + public url: string; public readonly headers: { [header: string]: string | number}; public readonly rejectUnauthorized: boolean; - protected readonly requester: XhrStaticPromisified; - protected readonly useXMLHttpRequest: boolean; + public readonly requester: XhrStaticPromisified; + public readonly useXMLHttpRequest: boolean; constructor({ token, diff --git a/src/infrastructure/Bundler.ts b/src/infrastructure/Bundler.ts index dc07965a..bc02bcb8 100644 --- a/src/infrastructure/Bundler.ts +++ b/src/infrastructure/Bundler.ts @@ -10,7 +10,7 @@ function Bundler( } return class Bundle implements BundleClass { [K: string]: any; - constructor(baseOptions: BaseModelContructorOptions = {}) { + constructor(baseOptions: BaseModelContructorOptions) { Object.keys(combined).forEach((serviceName) => { this[serviceName] = new combined[serviceName](baseOptions); }); diff --git a/test/tests/infrastructure/Bundle.ts b/test/tests/infrastructure/Bundle.ts index 13bd4722..36e73502 100644 --- a/test/tests/infrastructure/Bundle.ts +++ b/test/tests/infrastructure/Bundle.ts @@ -13,8 +13,8 @@ class Test2 { } test('No classes passed to Bundler returns an empty Bundle', async () => { - const Bundle = Bundler(); - const services = new Bundle(); + const Bundle = Bundler(undefined as any); + const services = new Bundle(undefined as any); expect(services).toEqual({}); });