From e5a5972e6fef4261cdf13d696d1a25a2bd456ea7 Mon Sep 17 00:00:00 2001 From: "idan.d" Date: Fri, 17 Aug 2018 01:21:01 +0300 Subject: [PATCH] strictly typed Schema set arguments --- types/mongoose/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index 5eea1625b5..c24427498f 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -769,8 +769,8 @@ declare module "mongoose" { * @param key option name * @param value if not passed, the current option value is returned */ - set(key: string): any; - set(key: string, value: any): this; + set(key: T): SchemaOptions[T]; + set(key: T, value: SchemaOptions[T]): this; /** * Adds static "class" methods to Models compiled from this schema.