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.

26 lines 858 B
"use strict"; // Copyright Contributors to the CitrineOS Project // // SPDX-License-Identifier: Apache 2.0 Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfigStoreFactory = void 0; 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; } } exports.ConfigStoreFactory = ConfigStoreFactory; ConfigStoreFactory.instance = null; //# sourceMappingURL=ConfigStore.js.map