UNPKG

@nodeboot/starter-persistence

Version:

Nodeboot starter package for persistence. Supports data access layer auto-configuration providing features like database initialization, consistency check, entity mapping, repository pattern, transactions, paging, migrations, persistence listeners, persis

21 lines 808 B
/** * Class decorator for marking a class as a data repository. * * Registers the repository with the PersistenceContext and associates it with an entity. * Validates that the repository extends one of TypeORM's Repository classes (Repository, MongoRepository, TreeRepository). * * @param {Function} entity - The entity class associated with the repository. * @returns {ClassDecorator} The class decorator function. * * @throws {Error} If the target class does not extend a supported repository class. * * @example * ```ts * @DataRepository(User) * export class UserRepository extends Repository<User> { } * ``` * * @author Manuel Santos <https://github.com/manusant> */ export declare const DataRepository: (entity: Function) => ClassDecorator; //# sourceMappingURL=DataRepository.d.ts.map