kossnocorp / typesaurus

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

Doc id type fix #103

Open SrBrahma opened 2 years ago

SrBrahma commented 2 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 2 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