UNPKG

@aire-ux/aire-condensation

Version:

Client-side serialization library for Aire-UX

23 lines (22 loc) 797 B
import { Class } from "./types"; import { PropertyConfiguration, RootElementConfiguration } from "./root-element"; export declare type PropertyDefinition = { type: Class<any>; realName: string; readAlias: string; writeAlias: string; }; export declare type TypeRegistration<T> = { alias: string; properties?: Map<string, PropertyDefinition>; }; export default class TypeRegistry { private readonly types; constructor(); register<T>(type: Class<T>): void; contains<T>(type: Class<T>): boolean; configure<T>(type: Class<T>, cfg: RootElementConfiguration): void; resolveConfiguration<T>(type: Class<T>): TypeRegistration<T>; private check; defineProperty<T>(target: Class<T>, propertyName: string, configuration: PropertyConfiguration): void; }