Skip to content

Commit 114d68a

Browse files
committed
Added mongoose.Types.ObjectId.toHexString()
1 parent 017cb72 commit 114d68a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

mongoose/mongoose-tests.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,3 +364,5 @@ schema.virtual('display_name')
364364
.get(function(): string { return this.name; })
365365
.set((value: string): void => {});
366366

367+
var id : mongoose.Types.ObjectId;
368+
var s = id.toHexString();

mongoose/mongoose.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ declare module "mongoose" {
7878
set(fn: Function): VirtualType;
7979
}
8080
export module Types {
81-
export class ObjectId {}
81+
export class ObjectId {
82+
toHexString(): string;
83+
}
8284
}
8385

8486
export class Schema {

0 commit comments

Comments
 (0)