UNPKG

mongocat

Version:

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

15 lines (14 loc) 386 B
import { Schema } from 'mongoose'; import { IPolymorphicConsumer } from '../types'; /** * * @param options = { key: '_id', localKey: 'modelId', fromRef: 'modelType', toPath: 'content', withTimestamp: true, } * @returns */ export declare const polymorphicConsumer: (ops: IPolymorphicConsumer) => (schema: Schema) => Error | undefined;