Skip to content

Commit

Permalink
fix(index.d.ts): allow using Schema.Types.* for as SchemaDefinition…
Browse files Browse the repository at this point in the history
…Property re: #9958
  • Loading branch information
vkarpov15 committed Feb 23, 2021
1 parent b5c6a50 commit a3c9018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1189,9 +1189,9 @@ declare module 'mongoose' {
}

type SchemaDefinitionWithBuiltInClass<T extends number | string | Function> = 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 = undefined> = T extends string | number | Function
Expand Down

0 comments on commit a3c9018

Please sign in to comment.