From 1971373cdd59cb3080dbbf1ab8b342f0fbf28768 Mon Sep 17 00:00:00 2001 From: mbiegert Date: Wed, 26 Feb 2020 01:31:54 +0100 Subject: [PATCH] [@types/mongoose] Add the paths property to Schema type (#42307) --- types/mongoose/index.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index 867f844e3f..2a845f2d9c 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -914,6 +914,13 @@ declare module "mongoose" { */ requiredPaths(invalidate?: boolean): string[]; + /** + * Lists all paths and their type in the current schema. + */ + paths: { + [key: string]: SchemaType; + } + /** * Sets/gets a schema option. * @param key option name