Have been using the library and was working fine and suddenly when restarted the application on metro bundler, it started giving the following error.
node_modules/@react-native-async-storage/async-storage/src/index.ts: Only declares and type imports are allowed inside declare module.
// @ts-ignore AsyncStorage mock module
declare module '@react-native-async-storage/async-storage/jest/async-storage-mock' {
export function useAsyncStorage(key: string): AsyncStorageHook;
^
const AsyncStorageLib: AsyncStorageStatic;
export default AsyncStorageLib;
}
Have tried to delete node_modules and did npm install but the problem still persists.