nukak
Version:
flexible and efficient ORM, with declarative JSON syntax and smart type-safety
9 lines (8 loc) • 679 B
TypeScript
import type { RelationOptions, RelationOneToOneOptions, RelationOneToManyOptions, RelationManyToOneOptions, RelationManyToManyOptions } from '../../type/index.js';
declare function Relation<E>(opts: RelationOptions<E>): (target: object, key: string) => void;
type RelationReturn = ReturnType<typeof Relation>;
export declare function OneToOne<E>(opts?: RelationOneToOneOptions<E>): RelationReturn;
export declare function ManyToOne<E>(opts?: RelationManyToOneOptions<E>): RelationReturn;
export declare function OneToMany<E>(opts: RelationOneToManyOptions<E>): RelationReturn;
export declare function ManyToMany<E>(opts: RelationManyToManyOptions<E>): RelationReturn;
export {};