DEV Community

Discussion on: Writing Mongo Realm serverless functions with TypeScript

Collapse
 
dimaip profile image
Dmitri Pisarev 🇷🇺

Thanks for sharing!
However manually providing type definitions is a nightmare, especially things like cluster.db('x').collection('x').findOneAndUpdate... You can't even borrow definitions from mongodb node driver because they are slightly different here and there :(

Collapse
 
stanbar profile image
Stanislaw Baranski

I assume it's something you have already figured out yourself, but I've added the "🔩 Add type declarations" subsection, it's not perfect but isn't that bad either.