Skip to content

Commit

Permalink
fix(index.d.ts): allow SchemaTypes.Mixed for all schema definition pr…
Browse files Browse the repository at this point in the history
…operties to allow using union types

Fix #10900
  • Loading branch information
vkarpov15 committed Dec 9, 2021
1 parent ba7147c commit 61ad24d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,8 @@ declare module 'mongoose' {
SchemaTypeOptions<T extends undefined ? any : T>[] |
Function[] |
SchemaDefinition<T> |
SchemaDefinition<T>[];
SchemaDefinition<T>[] |
typeof SchemaTypes.Mixed;

type SchemaDefinition<T = undefined> = T extends undefined
? { [path: string]: SchemaDefinitionProperty; }
Expand Down

0 comments on commit 61ad24d

Please sign in to comment.