@travetto/registry
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -18,3 +18,3 @@ { | ||
"scripts": {}, | ||
"version": "0.0.5" | ||
"version": "0.0.6" | ||
} |
@@ -11,8 +11,13 @@ import { Class } from '../model/types'; | ||
protected descendents: Registry[] = []; | ||
protected parents: ClassSource[] = []; | ||
constructor(protected parent?: ClassSource) { | ||
if (parent) { | ||
this.listen(parent); | ||
if (parent instanceof Registry) { | ||
parent.descendents.push(this); | ||
constructor(...parents: ClassSource[]) { | ||
this.parents = parents; | ||
if (this.parents.length) { | ||
for (let parent of this.parents) { | ||
this.listen(parent); | ||
if (parent instanceof Registry) { | ||
parent.descendents.push(this); | ||
} | ||
} | ||
@@ -37,5 +42,4 @@ } | ||
if (this.parent && !(this.parent instanceof Registry)) { | ||
await this.parent.init(); | ||
} | ||
let waitFor = this.parents.filter(x => !(x instanceof Registry)); | ||
await Promise.all(waitFor); | ||
@@ -42,0 +46,0 @@ let classes = await this.initialInstall(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14447
409