import { GlossaristModel } from './base.js'; /** * Per-class registry of named subtypes. The registry is keyed by * `type` discriminator and maps to the constructor function. Used by * NonVerbalEntity (Figure/Table/Formula), NonVerbalReference * (Figure/Table/Formula references), and any future RegistrableModel * subclass that needs polymorphic dispatch on a string discriminator. * * Stored as a WeakMap keyed by the base class function, so each base * gets its own namespace (NonVerbalEntity.register does not collide * with NonVerbalReference.register). * * The registry stores constructors as `Function` because TS's strict * variance on constructor params makes a typed constraint reject * subclasses with narrower param types. The dispatch site casts the * result back to the specific subclass. */ type AnyCtor = new (...args: any[]) => any; export declare class RegistrableModel extends GlossaristModel { static _registry(): Map; static register(type: string, cls: AnyCtor): void; static fromData(this: new (...args: any[]) => T, data: unknown): T; } export {}; //# sourceMappingURL=registrable.d.ts.map