From 055c6c693ffd01d98696a0ef6d2c26e7400430bc Mon Sep 17 00:00:00 2001 From: hasezoey Date: Tue, 28 Jun 2022 10:17:32 +0200 Subject: [PATCH 1/2] fix(types): change index "weights" to be more explicit --- types/indexes.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/indexes.d.ts b/types/indexes.d.ts index e1395865beb..35d9f94fd33 100644 --- a/types/indexes.d.ts +++ b/types/indexes.d.ts @@ -93,6 +93,6 @@ declare module 'mongoose' { * ``` */ expires?: number | string; - weights?: AnyObject; + weights?: Record; } -} \ No newline at end of file +} From 793ac4776aa98b66779317e566f9515044ae3827 Mon Sep 17 00:00:00 2001 From: hasezoey Date: Tue, 28 Jun 2022 11:10:52 +0200 Subject: [PATCH 2/2] fix(types): change index "weights" to only allow "string" keys --- types/indexes.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/indexes.d.ts b/types/indexes.d.ts index 35d9f94fd33..fc3a51b0953 100644 --- a/types/indexes.d.ts +++ b/types/indexes.d.ts @@ -93,6 +93,6 @@ declare module 'mongoose' { * ``` */ expires?: number | string; - weights?: Record; + weights?: Record; } }