UNPKG

react-obsidian

Version:

Dependency injection framework for React and React Native applications

30 lines 1.41 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const GraphProperties_1 = __importDefault(require("./GraphProperties")); class ProvidedPropertiesStore { constructor() { this.providedPropertiesForGraph = new Map(); } getMangledProperty(graph, unmangledProp) { var _a; return (_a = this.providedPropertiesForGraph.get(graph.name)) === null || _a === void 0 ? void 0 : _a.getMangledProperty(unmangledProp); } set(graph, mangledProperty, unmangledProperty) { var _a; const graphProperties = (_a = this.providedPropertiesForGraph.get(graph.name)) !== null && _a !== void 0 ? _a : new GraphProperties_1.default(); graphProperties.add(mangledProperty, unmangledProperty); this.providedPropertiesForGraph.set(graph.name, graphProperties); } getMangledProperties(graph) { var _a, _b; return (_b = (_a = this.providedPropertiesForGraph.get(graph.name)) === null || _a === void 0 ? void 0 : _a.getMangledProperties()) !== null && _b !== void 0 ? _b : []; } clear(graph) { this.providedPropertiesForGraph.delete(graph.name); } } exports.default = new ProvidedPropertiesStore(); //# sourceMappingURL=ProvidedPropertiesStore.js.map