From 21b1f385e6b90d381615406f164097997ba7ef14 Mon Sep 17 00:00:00 2001 From: Balu Babu Date: Tue, 12 Mar 2024 17:44:54 +0530 Subject: [PATCH] chore: added explicit typecasts for certain return statements --- .../src/team-collection/team-collection.service.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/hoppscotch-backend/src/team-collection/team-collection.service.ts b/packages/hoppscotch-backend/src/team-collection/team-collection.service.ts index 39a0bfc4f..7ebd3a632 100644 --- a/packages/hoppscotch-backend/src/team-collection/team-collection.service.ts +++ b/packages/hoppscotch-backend/src/team-collection/team-collection.service.ts @@ -1250,10 +1250,10 @@ export class TeamCollectionService { * @returns The parent tree of the parent collections */ private generateParentTree(parentCollections: ParentTreeQueryReturnType[]) { - function findChildren(id): CollectionSearchNode[] { + function findChildren(id: string): CollectionSearchNode[] { const collection = parentCollections.filter((item) => item.id === id)[0]; if (collection.parentID == null) { - return [ + return [ { id: collection.id, title: collection.title, @@ -1263,7 +1263,7 @@ export class TeamCollectionService { ]; } - const res = [ + const res = [ { id: collection.id, title: collection.title, @@ -1276,7 +1276,7 @@ export class TeamCollectionService { if (parentCollections.length > 0) { if (parentCollections[0].parentID == null) { - return [ + return [ { id: parentCollections[0].id, title: parentCollections[0].title, @@ -1286,7 +1286,7 @@ export class TeamCollectionService { ]; } - return [ + return [ { id: parentCollections[0].id, title: parentCollections[0].title, @@ -1296,7 +1296,7 @@ export class TeamCollectionService { ]; } - return []; + return []; } /**