UNPKG

@techmmunity/symbiosis

Version:

Symbiosis - The Ultimate OM For All Databases

20 lines (19 loc) 732 B
import type { EntityManager } from "../../../entity-manager"; import type { DatabaseEntity } from "../../../types/database-entity"; import type { BaseQueryOptions } from "../../types/query-options"; import type { SaveData } from "../../types/save-conditions"; interface Injectables { entityManager: EntityManager; entity: any; } export interface BeforeSaveInput<Entity> { data: SaveData<Entity>; options?: BaseQueryOptions; } export interface BeforeSaveOutput { data: SaveData<DatabaseEntity>; returnArray: boolean; options?: BaseQueryOptions; } export declare const beforeSave: <Entity>({ entity, entityManager }: Injectables, { data, options }: BeforeSaveInput<Entity>) => BeforeSaveOutput; export {};