react-obsidian
Version:
Dependency injection framework for React and React Native applications
14 lines • 584 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.singleton = singleton;
const singleton_modern_1 = require("./singleton.modern");
const singleton_legacy_1 = require("./singleton.legacy");
const decorators_1 = require("../../utils/decorators");
function singleton() {
return (...args) => {
return (0, decorators_1.shouldUseModernDecorator)(args) ?
(0, singleton_modern_1.modernDecorator)(args[0]) :
(0, singleton_legacy_1.legacyDecorator)(args[0], args[1], args[2]);
};
}
//# sourceMappingURL=Singleton.js.map