We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Yes
DocumentSnapshot or DocumentReference update method can't be used with typed interfaces. I get the following typescript error
DocumentSnapshot
DocumentReference
update
TS2345: Argument of type MyInterface is not assignable to parameter of type { [x: string]: any; } & AddPrefixToKeys<string, any>
Calls like this will get errors:
const data = snapshot.data() as MyInterface; db.collection(`anypath`).doc(id).update(data)
Quick workaround would be to cast it as any
db.collection(`anypath`).doc(id).update(data as any)
But it would require to refactor every update call which can be painful for large projects.
The text was updated successfully, but these errors were encountered:
I found a few problems with this issue:
Sorry, something went wrong.
No branches or pull requests
[READ] Step 1: Are you in the right place?
Yes
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
DocumentSnapshot
orDocumentReference
update
method can't be used with typed interfaces. I get the following typescript errorRelevant Code:
Calls like this will get errors:
Quick workaround would be to cast it as any
But it would require to refactor every
update
call which can be painful for large projects.The text was updated successfully, but these errors were encountered: