Skip to content

Commit 9702ac2

Browse files
authored
Merge pull request #15414 from Sainan/id-type
types: fix signature of DocumentArray.id
2 parents 7f0d4ce + 13f8ce3 commit 9702ac2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ declare module 'mongoose' {
7070
create(obj: any): THydratedDocumentType;
7171

7272
/** Searches array items for the first document with a matching _id. */
73-
id(id: any): THydratedDocumentType | null;
73+
id(id: ObjectId | string | number | Buffer): THydratedDocumentType | null;
7474

7575
push(...args: (AnyKeys<T> & AnyObject)[]): number;
7676

0 commit comments

Comments
 (0)