Skip to content

Commit 94915fd

Browse files
authored
Merge pull request #15688 from Catwallon/fix/default_id_type
types(models): default _id type to ObjectId for Document
2 parents 88a462a + c43fae1 commit 94915fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/document.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ declare module 'mongoose' {
1818
* * TQueryHelpers - Object with any helpers that should be mixed into the Query type
1919
* * DocType - the type of the actual Document created
2020
*/
21-
class Document<T = unknown, TQueryHelpers = any, DocType = any, TVirtuals = Record<string, any>, TSchemaOptions = {}> {
21+
class Document<T = Types.ObjectId, TQueryHelpers = any, DocType = any, TVirtuals = Record<string, any>, TSchemaOptions = {}> {
2222
constructor(doc?: any);
2323

2424
/** This documents _id. */

0 commit comments

Comments
 (0)