seald / nedb

The JavaScript Database, for Node.js, nw.js, electron and the browser
MIT License
351 stars 32 forks source link

Improved TS typings: make nedb methods return _id #30

Closed martpie closed 1 year ago

martpie commented 1 year ago

This may be a bit noisy, sorry for that. The important commit is 28cc2ded55e572c9175bd8edbac5647add936413.

The problem:

Screenshot 2022-12-25 at 23 36 20

This diff basically make it explicit that _id is provided by nedb and will be returned in addition of the data of the document.

I made a couple of improvements regarding formatting and naming, but I can roll those back if you don't like them.

tex0l commented 1 year ago

Hi @martpie, I just saw your PR, since you allowed me to push onto your PR, I took the liberty of rebasing it, updating some dependencies and removing the Document import you introduced but which wasn't used.

Are my changes ok for you? If so, I'll merge the PR.

martpie commented 1 year ago

Looks pretty good to me!