瀏覽代碼

declare variable with type instead of typecasting

Abhinav-grd 4 年之前
父節點
當前提交
f6c8102fec
共有 1 個文件被更改,包括 2 次插入2 次删除
  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;
 };