Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update with-mongodb to be TypeScript-friendly
I slightly modified the approach so TypeScript can correctly infer types without actually having to type anything but the global: **index.d.ts** ```ts import { Db, MongoClient } from "mongodb"; declare global { namespace NodeJS { interface Global { mongoCache: { conn: { client: MongoClient | null; db: Db | null; } promise: Promise<MongoClient> | null; }; } } } ```
- Loading branch information