Multiple Flow errors resulting from possibility of null object IDs #1205
Labels
help: needs-triage
Issue needs additional investigation/triaging.
plugin: firestore
Firebase Cloud Firestore
tools: typings
TypeScript / Flow
Milestone
I just upgraded to a version of this library that has Flow types, and now Flow is reporting errors just about anywhere I reference the "id", for example of in DocumentSnapshot, Path, CollectionReference, and DocumentReference.
Solving these errors requires adding existence checks everywhere in my application that accesses an
id
property, which seems unnecessary and cumbersome. Are there really common/valid cases where an objectsid
would be null? Basically I'm not seeing a need for the| null
part of the type definition.The text was updated successfully, but these errors were encountered: