UNPKG

git-goose

Version:

a mongoose plugin that enables git like change tracking

10 lines (9 loc) 573 B
import { Model, Schema } from 'mongoose'; import { ContextualGitConfig } from './config'; import { CommittableModel, GlobalPatcherName, PatcherName } from './types'; export declare function git<TargetDocType, TPatcherName extends PatcherName = GlobalPatcherName>(schema: Schema<TargetDocType>, conf?: Partial<ContextualGitConfig<TPatcherName>>): void; /** * Typescript type assertion for the CommittableModels * @param model - The model which should have had the plugin loaded */ export declare function committable<M extends Model<any>>(model: M): CommittableModel<M>;