@tripsnek/tmf
Version:
TypeScript Modeling Framework - A TypeScript port of the Eclipse Modeling Framework (EMF)
24 lines • 715 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EPackageRegistry = void 0;
class EPackageRegistry {
pathToPkg = new Map();
/** Singleton */
static eINSTANCE;
// Add a getter that ensures proper initialization order
static getInstance() {
if (!this.eINSTANCE) {
// Ensure CorePackage is initialized first
this.eINSTANCE = new EPackageRegistry();
}
return this.eINSTANCE;
}
register(path, pkg) {
this.pathToPkg.set(path, pkg);
}
getPackage(path) {
return this.pathToPkg.get(path);
}
}
exports.EPackageRegistry = EPackageRegistry;
//# sourceMappingURL=e-package-registry.js.map