UNPKG

@typegoose/typegoose

Version:

Define Mongoose models using TypeScript classes

15 lines (14 loc) 575 B
import type { AnyParamConstructor, BeAnObject, IModelOptions } from './types'; /** * Define Options for the Class * @param options The Options to set * @example Example: * ```ts * @modelOptions({ schemaOptions: { timestamps: true } }) * class ClassName {} * * // The default Class "TimeStamps" can be used for type information and options already set * ``` */ export declare function modelOptions<U extends AnyParamConstructor<any> = any, QueryHelpers = BeAnObject>(options: IModelOptions<U, QueryHelpers>): ClassDecorator; export { modelOptions as ModelOptions };