File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ declare module 'mongoose' {
2
2
type IfAny < IFTYPE , THENTYPE , ELSETYPE = IFTYPE > = 0 extends ( 1 & IFTYPE ) ? THENTYPE : ELSETYPE ;
3
3
type IfUnknown < IFTYPE , THENTYPE > = unknown extends IFTYPE ? THENTYPE : IFTYPE ;
4
4
5
- type WithLevel1NestedPaths < T , K extends keyof T = keyof T > = {
5
+ type WithLevel1NestedPaths < T , K extends keyof T = keyof T > = IsItRecordAndNotAny < T > extends true ? {
6
6
[ P in K | NestedPaths < Required < T > , K > ] : P extends K
7
7
// Handle top-level paths
8
8
// First, drill into documents so we don't end up surfacing `$assertPopulated`, etc.
@@ -28,7 +28,7 @@ declare module 'mongoose' {
28
28
: never
29
29
: never
30
30
: never ;
31
- } ;
31
+ } : T ;
32
32
33
33
type HasStringIndex < T > =
34
34
string extends Extract < keyof T , string > ? true : false ;
You can’t perform that action at this time.
0 commit comments