UNPKG

dependency-injection-cat

Version:

DI Cat is a truly clean DI-container, which allows you not to pollute your business logic with decorators from DI/IOC libraries!

29 lines (28 loc) 964 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TsConfigProvider = void 0; var tsconfig_paths_1 = require("tsconfig-paths"); var TsConfigProvider = /** @class */ (function () { function TsConfigProvider() { } Object.defineProperty(TsConfigProvider, "tsConfig", { get: function () { if (this.config === null) { throw new Error('Can not load tsconfig file'); } return this.config; }, enumerable: false, configurable: true }); TsConfigProvider.init = function () { var configLoaderResult = (0, tsconfig_paths_1.loadConfig)(); if (configLoaderResult.resultType === 'failed') { throw new Error('Can not load tsconfig file'); } this.config = configLoaderResult; }; TsConfigProvider.config = null; return TsConfigProvider; }()); exports.TsConfigProvider = TsConfigProvider;