UNPKG

@citrineos/base

Version:

The base module for OCPP v2.0.1 including all interfaces. This module is not intended to be used directly, but rather as a dependency for other modules.

22 lines 702 B
// Copyright Contributors to the CitrineOS Project // // SPDX-License-Identifier: Apache 2.0 export class ConfigStoreFactory { static setConfigStore(configStorage) { if (this.instance === null) { this.instance = configStorage; } else { throw new Error('ConfigStore has already been initialized.'); } return this.instance; } static getInstance() { if (this.instance === null) { throw new Error('ConfigStore has not been initialized. Call ConfigStoreFactory.setConfigStore() first.'); } return this.instance; } } ConfigStoreFactory.instance = null; //# sourceMappingURL=ConfigStore.js.map