Skip to content

Commit

Permalink
Merge pull request #7 from Apaq/add-delete-all
Browse files Browse the repository at this point in the history
Fixes delete all
  • Loading branch information
michaelkrog authored Sep 13, 2024
2 parents c28ef7e + 36b8d03 commit a455ecf
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 a455ecf

Please sign in to comment.