deno.land / x / mongoose@6.7.5 / types / helpers.d.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
declare module 'mongoose' { import mongodb = require('mongodb');
/** * Mongoose uses this function to get the current time when setting * [timestamps](/docs/guide.html#timestamps). You may stub out this function * using a tool like [Sinon](https://www.npmjs.com/package/sinon) for testing. */ function now(): NativeDate;
/** * Tells `sanitizeFilter()` to skip the given object when filtering out potential query selector injection attacks. * Use this method when you have a known query selector that you want to use. */ function trusted<T>(obj: T): T;
/** * Returns true if the given value is a Mongoose ObjectId (using `instanceof`) or if the * given value is a 24 character hex string, which is the most commonly used string representation * of an ObjectId. */ function isObjectIdOrHexString(v: mongodb.ObjectId): true; function isObjectIdOrHexString(v: mongodb.ObjectId | string): boolean; function isObjectIdOrHexString(v: any): false;
/** * Returns true if Mongoose can cast the given value to an ObjectId, or * false otherwise. */ function isValidObjectId(v: mongodb.ObjectId | Types.ObjectId): true; function isValidObjectId(v: any): boolean;}
mongoose

Version Info

Tagged at
2 years ago