Browse Source

declare variable with type instead of typecasting

Abhinav-grd 4 years ago
parent
commit
f6c8102fec
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/services/collectionService.ts

+ 2 - 2
src/services/collectionService.ts

@@ -111,8 +111,8 @@ const getCollections = async (
 };
 
 export const getLocalCollections = async (): Promise<collection[]> => {
-    const collections =
-        ((await localForage.getItem(COLLECTIONS)) as collection[]) ?? [];
+    const collections: collection[] =
+        (await localForage.getItem(COLLECTIONS)) ?? [];
     return collections;
 };