kossnocorp / typesaurus

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

Doc id type fix #103

Open SrBrahma opened 3 years ago

SrBrahma commented 3 years ago

Fixes #101.

As DocId class isn't used directly but only to be checked by instanceof, this prop is just to deal with TS so it won't treat {} as any non-nullish type, messing with keys of model as stated in the linked issue above.

SrBrahma commented 3 years ago

The two problematic cases of the issue are fixed, as we can see:

Wont' accept any value on first param

image

Intellisense working when later params are filled

image