mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-18 15:55:30 +00:00
Fix type error after rebase
This commit is contained in:
parent
ffad9a34da
commit
ba65cd288e
6
package-lock.json
generated
6
package-lock.json
generated
@ -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",
|
||||
|
||||
@ -16,11 +16,11 @@ export type BaseModelContructorOptions =
|
||||
| BaseModelOptions & Required<Pick<BaseModelOptions, 'token'>>
|
||||
| BaseModelOptions & Required<Pick<BaseModelOptions, 'oauthToken'>>;
|
||||
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,
|
||||
|
||||
@ -10,7 +10,7 @@ function Bundler<T extends { [K: string]: typeof BaseService }>(
|
||||
}
|
||||
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);
|
||||
});
|
||||
|
||||
@ -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({});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user