UNPKG

@typegoose/typegoose

Version:

Define Mongoose models using TypeScript classes

15 lines (14 loc) 571 B
import type { SearchIndexDescription } from './types'; /** * Defines a search index for this Class which will then be added to the Schema. * * @param description - The description of the search index to add. * @example Example: * ```ts * @searchIndex({ name: 'descriptionIndex', definition: { mappings: { dynamic: true }}}) * class ClassName {} * ``` * @remarks Search indices are only supported when connected to MongoDB Atlas. */ export declare function searchIndex(description: SearchIndexDescription): ClassDecorator; export { searchIndex as SearchIndex };