UNPKG

typeorm-extension

Version:

A library to create/drop database, simple seeding data sets, ...

17 lines (16 loc) 538 B
import type { DataSource, EntityTarget, ObjectLiteral } from 'typeorm'; type EntityUniquenessCheckOptions<T> = { entityTarget: EntityTarget<T>; entity: Partial<T>; entityExisting?: Partial<T>; dataSource?: DataSource; }; /** * Check if a given entity does not already exist. * Composite unique keys on a null column can only be present once. * * @experimental * @param options */ export declare function isEntityUnique<T extends ObjectLiteral>(options: EntityUniquenessCheckOptions<T>): Promise<boolean>; export {};