add proper type

This commit is contained in:
Abhinav-grd 2021-05-07 09:01:42 +05:30
parent 5d86997edb
commit c2e2fa5737

View file

@ -168,7 +168,7 @@ export const syncCollections = async () => {
} }
}); });
let collections = [], let collections: Collection[] = [],
updationTime = await localForage.getItem<number>( updationTime = await localForage.getItem<number>(
COLLECTION_UPDATION_TIME COLLECTION_UPDATION_TIME
); );
@ -281,7 +281,8 @@ export const createCollection = async (
); );
return createdCollection; return createdCollection;
} catch (e) { } catch (e) {
console.error('Add collection failed', e); console.error('create collection failed', e);
throw e;
} }
}; };
@ -298,7 +299,7 @@ const postCollection = async (
); );
return response.data.collection; return response.data.collection;
} catch (e) { } catch (e) {
console.error('create Collection failed ', e); console.error('post Collection failed ', e);
} }
}; };