fix: обновил API типов

This commit is contained in:
Nikita Dezzpil Orlov 2021-10-05 14:31:38 +03:00
parent 50261ac29e
commit ead279ca5d

6
orm.d.ts vendored
View File

@ -66,6 +66,7 @@ export declare abstract class Repo<T extends Entity<any>> {
protected _entity: T;
protected _limit: number;
protected _offset: number;
private _transformer;
/**
* Возвращает объект соотв. сущности, например new App()
*/
@ -74,9 +75,8 @@ export declare abstract class Repo<T extends Entity<any>> {
* Возвращает название коллекции/таблицы/... хранящей записи соотв. сущностей
*/
abstract Name(): string;
_transformer: (object: any) => any;
constructor(storage: Storage_2);
resetTransformer(): void;
constructor(storage: Storage_2, transformer?: (obj: any) => any);
setTransformer(transformer?: (obj: any) => any): this;
get storage(): Storage_2;
save(entity: T): Promise<this>;
findById(id: string): Promise<T | null>;