From a3c9018e24df0e77b9dc3754fb54d038617c009e Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Tue, 23 Feb 2021 15:16:58 -0500 Subject: [PATCH] fix(index.d.ts): allow using `Schema.Types.*` for as SchemaDefinitionProperty re: #9958 --- index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 3244b0f417d..9f7e1915146 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1189,9 +1189,9 @@ declare module 'mongoose' { } type SchemaDefinitionWithBuiltInClass = T extends number - ? (typeof Number | 'number' | 'Number') + ? (typeof Number | 'number' | 'Number' | typeof Schema.Types.Number) : T extends string - ? (typeof String | 'string' | 'String') + ? (typeof String | 'string' | 'String' | typeof Schema.Types.String) : (Function | string); type SchemaDefinitionProperty = T extends string | number | Function