Skip to content

Commit

Permalink
types: add cleanIndexes() to IndexManager interface
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Dec 24, 2024
1 parent 682160f commit d9c7051
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions types/indexes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ declare module 'mongoose' {
function syncIndexes(options?: SyncIndexesOptions): Promise<ConnectionSyncIndexesResult>;

interface IndexManager {
/* Deletes all indexes that aren't defined in this model's schema. Used by `syncIndexes()`. */
cleanIndexes(options?: { toDrop?: string[], hideIndexes?: boolean }): Promise<string[]>;

/**
* Similar to `ensureIndexes()`, except for it uses the [`createIndex`](https://mongodb.github.io/node-mongodb-native/4.9/classes/Collection.html#createIndex)
* function.
Expand Down

0 comments on commit d9c7051

Please sign in to comment.