Replies: 2 comments 3 replies
-
I think for a thorough answer you'll have to show more code, however I don't think this is a problem specific to react-native-firebase, this appears more like a more general sort of type error. It looks kind of hard to fix! https://javascript.plainenglish.io/using-firestore-with-more-typescript-8058b6a88674 react-native-firebase doesn't have support for withConverter so the solution linked above (which looks valid, otherwise) may or may not be as useful here but it appears that with something like that and some casting you can probably achieve type-safety here without going full |
Beta Was this translation helpful? Give feedback.
-
Any solution for this? Above did not work in my project. Edit: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, while I was trying to do something like this:
doing this on Typescript throws type error saying
Argument of type '"field3.key1"' is not assignable to parameter of type '"field1" | "field2" | "field3"'.ts(2345)
Is there any way to do this without any error?
Beta Was this translation helpful? Give feedback.
All reactions