firebase-js-sdk icon indicating copy to clipboard operation
firebase-js-sdk copied to clipboard

Make Firestore collection and doc getters generic

Open btoo opened this issue 4 years ago • 3 comments

This enables the ability to define the ReturnType of Firestore's collection and doc getters

e.g.

const mySubcollection = myDocument
  ? myDocument.collection('mySubcollection') as firebase.firestore.CollectionReference<MySubcollectionItemType>
  : undefined

becomes

const mySubcollection = myDocument?.collection<MySubcollectionItemType>('mySubcollection')

btoo avatar Jan 19 '21 05:01 btoo

⚠️ No Changeset found

Latest commit: 4fcc4191cbcc51002b7749303bf4a62cca22e579

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jan 19 '21 05:01 changeset-bot[bot]

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

google-cla[bot] avatar Jan 19 '21 05:01 google-cla[bot]

@googlebot I signed it!

btoo avatar Jan 19 '21 05:01 btoo