MongoDB Smart ORM with TypeScript decorators. Current stable version 0.2.2, pre-1.0 active development. Differentiates by providing schema validation via decorators and strict typing for MongoDB documents. Lightweight alternative to Mongoose for TypeScript-first projects, but lacks maturity and documentation.
npm install mongo-strictNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MongoDB, defines a User model with schema, creates a document, and queries it.
Update calls: connect(uri, options, dbName) where dbName is the database name string.
Change third argument to options object: Model('User', schema, { collection: 'myUsers' }).Replace createConnection(uri) with connect(uri).
Set in tsconfig.json: 'experimentalDecorators': true, 'emitDecoratorMetadata': true.
Ensure all database operations use await or are properly handled as Promises.
Use import { connect } from 'mongo-strict'Define schema with new Schema({...}) and pass to Model.Use ES import syntax: import { ... } from 'mongo-strict'