Skip to content

Commit

Permalink
refactor: Rename remove method to removeItem in CollectionReference
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `remove` renamed to `removeItem` in CollectionReference
  • Loading branch information
alimd committed Sep 1, 2024
1 parent 949f261 commit 6238cae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/reference/src/collection-reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,11 +409,12 @@ export class CollectionReference<TItem extends JsonifiableObject = JsonifiableOb
*
* @example
* ```typescript
* collectionRef.remove('item1');
* collectionRef.removeItem('item1');
* collectionRef.itemExists('item1'); // Output: false
* ```
*/
remove(itemId: string | number): void {
this.logger__.logMethodArgs?.('remove', itemId);
removeItem(itemId: string | number): void {
this.logger__.logMethodArgs?.('removeItem', itemId);
delete this.context__.data[itemId];
this.updated__(null);
}
Expand Down

0 comments on commit 6238cae

Please sign in to comment.