@eang/core
Version:
eang - model driven enterprise event processing
18 lines (17 loc) • 822 B
TypeScript
import { Obj, IObj } from '../entity.js';
import { AnyObj } from './types.js';
type AnyConstructor = new (data: Record<string, unknown>) => AnyObj;
export declare const typeOfToClassMap: Record<AnyObj['typeOf'], AnyConstructor>;
export declare function registerTypeOfClass<T extends string>(typeOf: T, cls: new (data: Record<string, unknown>) => Obj<T>): void;
export declare function createObj(data: IObj | (Record<string, unknown> & {
id: string;
})): AnyObj;
export declare function createObj(data: IObj | (Record<string, unknown> & {
key: string;
typeOf: string;
})): AnyObj;
export declare function createObj(data: IObj | (Record<string, unknown> & {
typeOf: string;
})): AnyObj;
export declare function createObj(data: IObj | Record<string, unknown>, typeOf: string, key: string): AnyObj;
export {};