mongodb-typesafe-driver
Version:
mongodb type script safe driver
53 lines (33 loc) • 1.25 kB
Markdown
# mongodb-typesafe-driver
Type-safe MongoDB driver for Node.js with improved developer experience using TypeScript.
## ✨ Features
- Fully type-safe operations for MongoDB collections
- Strongly typed `find`, `insert`, `update`, `aggregate`, etc.
- Inference for schemas and documents
- Minimal and dependency-free
## 📦 Installation
```bash
npm install mongodb-typesafe-driver
```
Requires mongodb v5 as a peer dependency:
```bash
npm install mongodb
```
# Why ?
MongoDb not support type safe, see details:
https://www.mongodb.com/docs/drivers/node/current/fundamentals/typescript/#type-safety-and-dot-notation
# Goal
To improve mongodb types to make queries type safe.<br />
Not use code, only types. <br />
<br />
<br />
<br />
<br />
<br />
<br />
# Support nested? Yes!
<br />
<br />
# How it use?
Just use Collection type from this repository instead original Collection mongodb type.
See examples.ts for details.