e6c351859f
* 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; }; } } } ``` * lint Co-authored-by: Joe Haddad <joe.haddad@zeit.co> |
||
---|---|---|
.. | ||
mongodb.js |