UNPKG

@jovian/type-tools

Version:

TypeTools is a Typescript library for providing extensible tooling runtime validations and type helpers.

29 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfigSource = void 0; var rxjs_1 = require("rxjs"); var ConfigSource = (function () { function ConfigSource(configClass, configPartialData) { this.configData = new configClass(configPartialData); this.configBehaviorSubject = new rxjs_1.BehaviorSubject(this.configData); } ConfigSource.prototype.getConfigData = function () { return this.configData; }; Object.defineProperty(ConfigSource.prototype, "config", { get: function () { return this.configData; }, enumerable: false, configurable: true }); Object.defineProperty(ConfigSource.prototype, "change$", { get: function () { if (!this.configObservable$) { this.configObservable$ = this.configBehaviorSubject.asObservable(); } return this.configObservable$; }, enumerable: false, configurable: true }); return ConfigSource; }()); exports.ConfigSource = ConfigSource; //# sourceMappingURL=ix.config.source.js.map