import { Types } from 'mongoose' ; export type Id = '_id' ; export type VerOption = 'versionKey' ; export type VerKey = '__v' ; export type Timestamps = 'timestamps' ; export type CreatedAt = 'createdAt' ; export type UpdatedAt = 'updatedAt' ; export type Required = 'required' ; export type Select = 'select' ; export type Enum = 'enum' ; export interface SubDocumentNoId extends Omit < Types . Subdocument , Id > { } export interface SubDocument extends Types . Subdocument { } export interface SubDocumentArray < T extends SubDocument > extends Types . DocumentArray < T > { filter ( callbackfn , thisArg ? ) : SubDocumentArray < T > ; } export interface SubDocumentArrayNoId < T extends SubDocumentNoId > extends Types . Array < T > { create ( obj ) : T ; inspect ( ) : T [ ] ; toObject ( options ? ) : T [ ] ; filter ( callbackfn , thisArg ? ) : SubDocumentArrayNoId < T > ; }