@travetto/model
Advanced tools
Comparing version 0.0.34 to 0.0.35
@@ -23,3 +23,3 @@ { | ||
}, | ||
"version": "0.0.34" | ||
"version": "0.0.35" | ||
} |
@@ -33,3 +33,3 @@ import { Class } from '@travetto/registry'; | ||
if (this.source.onSchemaChange) { | ||
SchemaRegistry.onSchemaChange(this.source.onSchemaChange.bind(this.source)); | ||
ModelRegistry.onSchemaChange(this.source.onSchemaChange.bind(this.source)); | ||
} | ||
@@ -36,0 +36,0 @@ if (this.source.onChange) { |
@@ -1,2 +0,2 @@ | ||
import { SchemaRegistry } from '@travetto/schema'; | ||
import { SchemaRegistry, SchemaChangeEvent } from '@travetto/schema'; | ||
import { MetadataRegistry, Class } from '@travetto/registry'; | ||
@@ -19,4 +19,12 @@ import { DependencyRegistry } from '@travetto/di'; | ||
} | ||
onSchemaChange(cb: (x: SchemaChangeEvent) => void) { | ||
SchemaRegistry.onSchemaChange((e) => { | ||
if (this.has(e.cls)) { | ||
cb(e); | ||
} | ||
}); | ||
} | ||
} | ||
export const ModelRegistry = new $ModelRegistry(); |
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
37606
944