mongoose-management
Version:
Mongoose schemas management tool
45 lines (44 loc) • 1.27 kB
TypeScript
/**
* ######################################################################
* # #
* # Do not change the file! #
* # #
* # All changes are deleted the next time the collection data is read. #
* # #
* ######################################################################
*/
import { Schema } from 'mongoose';
import { indexType } from './types';
/**
*
* @param schema
* @param indexes
*/
export declare const addIndexes: (schema: Schema<any>, indexes: indexType[]) => void;
/**
*
* @param schema
* @param virtual
*/
export declare const addVirtualProperties: (schema: Schema<any>, virtual: {
[k: string]: {
get?: (() => void) | undefined;
set?: (() => void) | undefined;
};
}) => void;
/**
*
* @param name
* @param items
*/
export declare const checkDuplicateKeys: (name: string, items: {}[]) => void;
/**
*
* @param items
*/
export declare const getDuplicates: (items: string[]) => string[];
/**
*
* @param items
*/
export declare const extractKeys: (items: {}[]) => string[];