import { injectable } from 'inversify'; import { merge } from 'lodash'; import { IConfigStore } from './interfaces'; @injectable() export default class ConfigStore implements IConfigStore { private _config: T; /** * Get the current config */ get config(): T { return this._config; } /** * Merge the new config in the previous one */ set config(c: T) { this._config = c; } public mergeConfig(c: T): void { this._config = merge({}, this._config, c); } }