Skip to content

Commit 1aac0fd

Browse files
authored
Deprecate createIndex
1 parent d9d1171 commit 1aac0fd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/collection.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ export abstract class BaseCollection<T extends object = any>
633633
);
634634
}
635635

636-
createIndex(details: any) {
636+
ensureIndex(details: any) {
637637
return this._connection.request(
638638
{
639639
method: "POST",
@@ -645,6 +645,11 @@ export abstract class BaseCollection<T extends object = any>
645645
);
646646
}
647647

648+
/** @deprecated use ensureIndex instead */
649+
createIndex(details: any) {
650+
return this.ensureIndex(details);
651+
}
652+
648653
dropIndex(indexHandle: IndexHandle) {
649654
return this._connection.request(
650655
{

0 commit comments

Comments
 (0)