Skip to content

Commit

Permalink
Fixes delete all
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkrog committed Sep 13, 2024
1 parent 3556f1e commit 6d95ed3
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/repository/crud-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,12 @@ export interface CrudRepository<TYPE, IDTYPE> {
delete(entity: TYPE): Promise<void>;

/**
* Deletes multiple entities from the repository.
* Deletes multiple entities from the repository. If entities are specified, then only the specified will be deleted.
* Otherwise all entities will be deleted.
*
* @param {TYPE[]} entities - The entities to delete.
* @param {TYPE[]} entities - The entities to delete. (Optional)
* @returns {Promise<void>} - A promise that resolves when the entities are deleted.
*/
deleteAll(entities: TYPE[]): Promise<void>;
deleteAll(entities?: TYPE[]): Promise<void>;

/**
* Deletes all entities from the repository.
*
* @returns {Promise<void>} - A promise that resolves when the entities are deleted.
*/
deleteAll(): Promise<void>;
}

0 comments on commit 6d95ed3

Please sign in to comment.