mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
meteor: add methods to Mongo.ObjectID
These method are accessible from meteor Mongo.ObjectID but missing. Per https://docs.meteor.com/api/collections.html#Mongo-ObjectID : "Mongo.ObjectID follows the same API as the Node MongoDB driver ObjectID class" When I check the Node.js MongoDB Driver API, only these two methods are interesting. (getTimestamp() doesn't make sense in Meteor). I've a test that call both methods successfully.
This commit is contained in:
5
types/meteor/mongo.d.ts
vendored
5
types/meteor/mongo.d.ts
vendored
@@ -214,7 +214,10 @@ declare module "meteor/mongo" {
|
||||
interface ObjectIDStatic {
|
||||
new (hexString?: string): ObjectID;
|
||||
}
|
||||
interface ObjectID { }
|
||||
interface ObjectID {
|
||||
toHexString(): string;
|
||||
equals(otherID: ObjectID): boolean;
|
||||
}
|
||||
|
||||
function setConnectionOptions(options: any): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user