@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 • 710 B
JavaScript
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
//
// SPDX-License-Identifier: Apache-2.0
export class ConfigStoreFactory {
static instance = null;
static setConfigStore(configStorage) {
if (this.instance === null) {
this.instance = configStorage;
}
else {
console.warn('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;
}
}
//# sourceMappingURL=ConfigStore.js.map