import { MetadataAdapter } from './adapters/metadata-adapter'; import { AnnotationDecorator } from './decorators/annotation-decorator'; export interface Type { new (): T; } export class ClassRepository { public types: Type[] = []; public add(...types: Type[]): void { this.types = this.types.concat(types); } public get(): T[] { const results = this.types.map(t => new t()); return results; } } export class ClassRegistry { public static MetadataAdapters = new ClassRepository(); public static AnnotationDecorators = new ClassRepository(); }