export class ObjectPrototype { __implements__: (typeof MarkerInterface | typeof ObjectInterface)[]; constructor(data?: T); toJSON(): T; } export type TUtilityProps = { name?: string; registry?: TUtilityRegistry; }; export class Utility { static __implements__: typeof UtilityInterface; static __name__: string; } export class UtilityNotFound { } type TUtilityEntry = { implementsInterface: UtilityInterface; unnamedUtility: Utility[] | undefined; namedUtility: Record>; }; export type TUtilityRegistry = { utilities: Record; registerUtility(utility: Utility): void; getUtility(implementsInterface: UtilityInterface, name?: string, fallbackReturnValue?: any): Utility; getUtilities(implementsInterface: UtilityInterface): Utility[]; }; export class UtilityRegistry implements TUtilityRegistry { utilities: any; register: Function; constructor(); registerUtility(utility: any): void; getUtility(implementsInterface: any, name?: any): Utility; getUtilities(implementsInterface: any): Utility[]; } export function createInterfaceDecorator(namespace: string): (intrfc: any) => void; export class MarkerInterface { static interfaceId: string; static providedBy(obj: ObjectPrototype): boolean; providedBy(obj: ObjectPrototype, interfaceId?: string): boolean; } export type TypeFromInterface = Omit; export class ObjectInterface { static interfaceId: string; constructor(context: ObjectPrototype); static providedBy(obj: ObjectPrototype): boolean; providedBy(obj: ObjectPrototype, interfaceId?: string): boolean; } export class AdapterInterface { static interfaceId: string; context?: ObjectPrototype; constructor(context: ObjectPrototype, registry?: TAdapterRegistry); } export class UtilityInterface { static interfaceId: string; static __name__: string; constructor(nameOrRegistry?: string | TUtilityRegistry, registry?: TUtilityRegistry); } type TAdapter = { context: T; }; export abstract class Adapter> implements TAdapter { static __implements__: typeof AdapterInterface; static __adapts__: typeof ObjectPrototype | ObjectInterface | MarkerInterface; context: TContext; constructor(context: TContext); } export class AdapterNotFound { } type TAdapterEntry = { interfaceAdapters: Adapter[]; objectAdapters: Adapter[]; }; export type TAdapterRegistry = { adapters: Record; registerAdapter(adapter: Adapter): void; getAdapter(obj: ObjectPrototype | typeof ObjectInterface | typeof MarkerInterface, implementsInterface: AdapterInterface | typeof AdapterInterface): Adapter; register: Function; }; export class AdapterRegistry implements TAdapterRegistry { adapters: any; registerAdapter: any; getAdapter: any; register: Function; constructor(); } export type TRegistry = TUtilityRegistry & TAdapterRegistry; export class LocalRegistry extends UtilityRegistry implements TRegistry { utilities: any; adapters: any; registerAdapter: any; registerUtility: any; getAdapter: any; getUtility: any; getUtilities: any; constructor(); } export const globalRegistry: TRegistry & { register: Function; }; //# sourceMappingURL=types.d.ts.map