UNPKG

mongocat

Version:

✨ Mongocat 😺 is easy to use, configuration based Denormalization mongoose plugin for read heavy applications. Mongocat reduces write complexity too.

13 lines (12 loc) 378 B
import { Schema } from 'mongoose'; import { IWatchConsumer } from '../types'; /** * It's used on ConsumerModel * @param options = { key: '_id', fromRef: 'Category', // make default: toPath = category inArray: true // if it's like genres } * @returns */ export declare const watchConsumer: (ops: IWatchConsumer) => (schema: Schema) => void;