/* eslint @typescript-eslint/no-explicit-any: 0 */
/* eslint @typescript-eslint/explicit-module-boundary-types: 0 */
/**
 * Global variables which can be reference during runtime.
 */
import { merge } from 'lodash';
export class Global {
    payloads = {};
    add(key, value) {
        const obj = { [key]: value };
        merge(this.payloads, obj);
        return this;
    }
    get(key) {
        return this.payloads[key];
    }
    keys() {
        return Object.keys(this.payloads);
    }
    static from(global) {
        const created = new Global();
        created.payloads = global.payloads;
        return created;
    }
}
//# sourceMappingURL=global.js.map