kossnocorp / typesaurus

🦕 Type-safe TypeScript-first ODM for Firestore
https://typesaurus.com
415 stars 36 forks source link

Ability to pass options to operations #56

Closed mwood23 closed 4 years ago

mwood23 commented 4 years ago

Awesome work on the library! For my app, it's common that I'll want to set data, but I'm not sure if it exists or not. Firebase handles this with passing {merge: true} to the set command. I looked and it didn't look possible right now.

https://firebase.google.com/docs/firestore/manage-data/add-data

Is that something you'd be interested in supporting? If you give me some direction I'd be happy to drop a PR.

mwood23 commented 4 years ago

Nevermind, found upsert. Thanks!

kossnocorp commented 4 years ago

Hey! I'm glad you liked it!