nukak
Version:
flexible and efficient ORM, with declarative JSON syntax and smart type-safety
10 lines (9 loc) • 756 B
TypeScript
import 'reflect-metadata';
import type { EntityMeta, EntityOptions, FieldOptions, RelationOptions, Type } from '../../type/index.js';
export declare function defineField<E>(entity: Type<E>, key: string, opts?: FieldOptions): EntityMeta<E>;
export declare function defineId<E>(entity: Type<E>, key: string, opts: FieldOptions): EntityMeta<E>;
export declare function defineRelation<E>(entity: Type<E>, key: string, opts: RelationOptions<E>): EntityMeta<E>;
export declare function defineEntity<E>(entity: Type<E>, opts?: EntityOptions): EntityMeta<E>;
export declare function getEntities(): Type<unknown>[];
export declare function getMeta<E>(entity: Type<E>): EntityMeta<E>;
export declare function isValidEntityType(type: unknown): type is Type<unknown>;