Skip to content

Commit d9c7051

Browse files
committed
types: add cleanIndexes() to IndexManager interface
1 parent 682160f commit d9c7051

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

types/indexes.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ declare module 'mongoose' {
1010
function syncIndexes(options?: SyncIndexesOptions): Promise<ConnectionSyncIndexesResult>;
1111

1212
interface IndexManager {
13+
/* Deletes all indexes that aren't defined in this model's schema. Used by `syncIndexes()`. */
14+
cleanIndexes(options?: { toDrop?: string[], hideIndexes?: boolean }): Promise<string[]>;
15+
1316
/**
1417
* Similar to `ensureIndexes()`, except for it uses the [`createIndex`](https://mongodb.github.io/node-mongodb-native/4.9/classes/Collection.html#createIndex)
1518
* function.

0 commit comments

Comments
 (0)