From c0cde18b1ac456e29118132ee88c9f115cc44442 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Sat, 31 Aug 2024 20:33:31 +0330 Subject: [PATCH] refactor(CollectionReference): Rename `item__` method parameter from `id` to `itemId` The `item__` method in the `CollectionReference` class has been updated to use the parameter name `itemId` instead of `id`. This change improves the clarity and readability of the code by using a more descriptive parameter name. Co-authored-by: Mohammad Honarvar --- packages/reference/src/collection-reference.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/reference/src/collection-reference.ts b/packages/reference/src/collection-reference.ts index 5724a39d..6f74dfdb 100644 --- a/packages/reference/src/collection-reference.ts +++ b/packages/reference/src/collection-reference.ts @@ -293,14 +293,14 @@ export class CollectionReference { - const item = this.context__.data[id]; + private item__(itemId: string | number): CollectionItem { + const item = this.context__.data[itemId]; if (item === undefined) { - this.logger__.accident('item_', 'collection_item_not_found', {id}); - throw new Error('collection_item_not_found', {cause: {id}}); + this.logger__.accident('item_', 'collection_item_not_found', {itemId}); + throw new Error('collection_item_not_found', {cause: {itemId}}); } return item; } @@ -403,7 +403,7 @@ export class CollectionReference