UNPKG

overmind

Version:
22 lines 762 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.lazy = void 0; function lazy(configurations) { return { actions: { lazy: { loadConfig({ state, execution, addNamespace }, key) { const configToLoad = configurations[key]; const namespacePath = execution.namespacePath .slice(0, execution.namespacePath.length - 1) .concat(key); return configToLoad().then((loadedConfig) => { addNamespace(loadedConfig, namespacePath, state); }); }, }, }, }; } exports.lazy = lazy; //# sourceMappingURL=lazy.js.map