MongoDB TypeScript

JSON →
library 3.1.0 ·javascript maintenance
verified Jun 5, 2026

mongodb-typescript is a lightweight wrapper around the official MongoDB Node.js driver that hydrates plain MongoDB documents into TypeScript-defined class instances. Version 3.1.0 requires mongodb ^4.8.0 and reflect-metadata ^0.1.13 as peer dependencies. It uses class-transformer under the hood to map between plain objects and classes, preserving methods, getters, and nested structures. Unlike Mongoose, it does not enforce validation, schema stripping, or middleware. Key features include decorators (@id, @nested, @ref, @ignore), automatic hydration/dehydration, population of referenced collections, and schema index definitions. The package ships TypeScript types and is designed for developers who want strong typing without the overhead of a full ODM. Release cadence is irregular; latest update in 2022.