Skip to content
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

Multiple Flow errors resulting from possibility of null object IDs #1205

Closed
benknight opened this issue Jun 13, 2018 · 2 comments
Closed

Multiple Flow errors resulting from possibility of null object IDs #1205

benknight opened this issue Jun 13, 2018 · 2 comments
Assignees
Labels
help: needs-triage Issue needs additional investigation/triaging. plugin: firestore Firebase Cloud Firestore tools: typings TypeScript / Flow
Milestone

Comments

@benknight
Copy link

benknight commented Jun 13, 2018

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 objects id would be null? Basically I'm not seeing a need for the | null part of the type definition.

@benknight benknight changed the title Multiple Flow errors resulting from DocumentReference.id type definition Multiple Flow errors resulting from possibility of null object IDs Jun 14, 2018
@chrisbianca chrisbianca added plugin: firestore Firebase Cloud Firestore tools: typings TypeScript / Flow labels Jun 18, 2018
@Ehesp
Copy link
Member

Ehesp commented Jul 4, 2018

Thanks for flagging - I'll look into this one, from a quick look I think you may be correct but will let you know for sure.

@Salakar Salakar added this to the v5.0.0 Release milestone Jul 10, 2018
@Salakar Salakar added Workflow: Needs Review Pending feedback or review from a maintainer. help: needs-triage Issue needs additional investigation/triaging. labels Jul 10, 2018
@Salakar Salakar self-assigned this Jul 10, 2018
@Salakar Salakar modified the milestones: v5.0.0 Release, v5.0.1+ Sep 24, 2018
@Salakar Salakar modified the milestones: v5.0.1+, v5.1.0 Oct 21, 2018
@Salakar Salakar assigned Ehesp and unassigned Salakar Oct 21, 2018
@Salakar Salakar modified the milestones: v5.1.0, v5.2.0 Oct 27, 2018
@Salakar Salakar closed this as completed in f752ab0 Jan 3, 2019
@Salakar
Copy link
Member

Salakar commented Jan 3, 2019

@benknight thanks for the report, have swapped these to be string only as you're right. Will land in v5.2.0. Sorry for the delay.

blankg pushed a commit to blankg/react-native-firebase that referenced this issue Jan 15, 2019
@mikehardy mikehardy removed the Workflow: Needs Review Pending feedback or review from a maintainer. label Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help: needs-triage Issue needs additional investigation/triaging. plugin: firestore Firebase Cloud Firestore tools: typings TypeScript / Flow
Projects
None yet
Development

No branches or pull requests

5 participants