From 8378c82ed619bd2ce29899b52184609db632d6ce Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Tue, 18 Jul 2023 16:33:05 -0400 Subject: [PATCH] types: allow any value for $meta because MongoDB now supports values other than "textScore" for $meta --- types/query.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/query.d.ts b/types/query.d.ts index ab05d38dd83..e60846e60a6 100644 --- a/types/query.d.ts +++ b/types/query.d.ts @@ -691,7 +691,7 @@ declare module 'mongoose' { slice(val: number | Array): this; /** Sets the sort order. If an object is passed, values allowed are `asc`, `desc`, `ascending`, `descending`, `1`, and `-1`. */ - sort(arg?: string | { [key: string]: SortOrder | { $meta: 'textScore' } } | [string, SortOrder][] | undefined | null): this; + sort(arg?: string | { [key: string]: SortOrder | { $meta: any } } | [string, SortOrder][] | undefined | null): this; /** Sets the tailable option (for use with capped collections). */ tailable(bool?: boolean, opts?: {