-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript support for jest? #504
Comments
What I did was to go to copied the whole block down, and changed the name to: I do not know if it is the right approach, if it is, someone could do a PR and solve the issue for the next person. |
Would also like this supported. When I follow your jest-setup in my TS project, I get:
|
@JoeKlimcak |
Typescript issue comes from the fact that the mock is not declared in our typings. In that case, I advise to use Jest setup file to mock AsyncStorage |
Closing due to inactivity. If you think this is a mistake, please reply and we'll reopen it. |
I'm having the same issue here with the import. |
Having the same issue as the comment saying: I'm having the same issue here with the import. |
This shouldn't have been closed. The mocks are still not typed. Converting your jest setup from JS to TS will yield the error everyone is talking about. |
I think this might be addressed by #805. Please test it and let me know how it goes. |
@tido64 I'm taking a look now. |
Updating appeared to solve the issue for me |
As the title implies, is there typescript support for
@react-native-async-storage/async-storage
?I figured in other discussions that the
@types
should be the same as the originalreact-native
async-storage or the predecessorreact-native-community
async-storage. However, I don't know how to implement the previous types on this module.Instructions would be appreciated!
The text was updated successfully, but these errors were encountered: