import { ClassType } from '@deepkit/core'; import { ReflectionKind, Type } from './reflection/type.js'; interface RegistryDecorator { predicate: (type: Type) => boolean; v: T; } export declare class TypeRegistry { protected results: { [kind in ReflectionKind]?: T; }; classes: Map, T>; protected decorators: RegistryDecorator[]; clear(): void; get(type: Type): T | undefined; decorator(predicate: (type: Type) => boolean, v: T): void; /** * Registers a template for all binary classes: ArrayBuffer, Uint8Array, Int8Array, etc. */ setBinary(v: T): void; setNumeric(v: T): void; /** * Registers a template for a given class type. * * As soon as a single template has registered for the given classType the template registry * only returns templates for this particular classType and omits all general purpose ReflectionKind.class templates for this particular classType. */ setClass(classType: ClassType, v: T): void; /** * Removes all registered templates. */ remove(kind: ReflectionKind): void; /** * Registers a new template and replaces all existing (added via register,prepend,append). */ set(kind: ReflectionKind | ReflectionKind[] | ((type: Type) => boolean), v: T): void; } export {};