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

feat(types): tighten up the types of callFirestore calls #1173

Merged

Conversation

dominics
Copy link
Contributor

@dominics dominics commented Feb 7, 2024

Using function overloading, define separate call types for the different actions of the callFirestore() method. Then use the built-in Firestore type declarations to tighten up the argument types for set/add/update etc.

Fixes #1172

Using function overloading, define separate call types for the different
actions of the callFirestore() method. Then use the built-in Firestore
type declarations to tighten up the argument types for set/add/update
Copy link

codecov bot commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (71feee8) 87.19% compared to head (fbf92b3) 87.19%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1173   +/-   ##
=======================================
  Coverage   87.19%   87.19%           
=======================================
  Files           6        6           
  Lines         289      289           
  Branches      108      108           
=======================================
  Hits          252      252           
  Misses         11       11           
  Partials       26       26           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@prescottprue
Copy link
Owner

prescottprue commented Feb 12, 2024

Nice! Love the separation of the different actions into their own types! Since this is just making types more accurate, but is still changing the external facing types, so I'm going to mark as feat to trigger a minor release

@prescottprue prescottprue changed the title refactor(types): tighten up the types of callFirestore calls feat(types): tighten up the types of callFirestore calls Feb 12, 2024
@prescottprue prescottprue merged commit 61a3edb into prescottprue:main Feb 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid options types are ignored, rather than erroring
2 participants