You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argument of type '() => AsyncStorageStatic' is not assignable to parameter of type '() => typeof import("/node_modules/@react-native-async-storage/async-storage/lib/typescript/index")'.
Type 'AsyncStorageStatic' is missing the following properties from type 'typeof import("/node_modules/@react-native-async-storage/async-storage/lib/typescript/index")': useAsyncStorage, AsyncStoragets(2345)
The work-around is to remove the typed mock, but I prefer not to do that:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
According to TypeScript typing, it looks like the Jest mock implementation delivered by this package is incomplete.
Using the following code (similar to the example in the docs):
This results in the following error:
Error log.
The work-around is to remove the typed mock, but I prefer not to do that:
I tried also to use
Partial
, but that gave a similar error:Does this count as a bug?
Beta Was this translation helpful? Give feedback.
All reactions