declare variable with type instead of typecasting

This commit is contained in:
Abhinav-grd 2021-02-09 11:12:23 +05:30
parent e8ae13221e
commit f6c8102fec

View file

@ -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;
};