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

collection.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
declare module 'mongoose' { import mongodb = require('mongodb');
/* * section collection.js * http://mongoosejs.com/docs/api.html#collection-js */ interface CollectionBase<T extends mongodb.Document> extends mongodb.Collection<T> { /* * Abstract methods. Some of these are already defined on the * mongodb.Collection interface so they've been commented out. */ ensureIndex(...args: any[]): any; findAndModify(...args: any[]): any; getIndexes(...args: any[]): any;
/** The collection name */ collectionName: string; /** The Connection instance */ conn: Connection; /** The collection name */ name: string; }
/* * section drivers/node-mongodb-native/collection.js * http://mongoosejs.com/docs/api.html#drivers-node-mongodb-native-collection-js */ interface Collection<T extends mongodb.Document = mongodb.Document> extends CollectionBase<T> { /** * Collection constructor * @param name name of the collection * @param conn A MongooseConnection instance * @param opts optional collection options */ // eslint-disable-next-line @typescript-eslint/no-misused-new new(name: string, conn: Connection, opts?: any): Collection<T>; /** Formatter for debug print args */ $format(arg: any, color?: boolean, shell?: boolean): string; /** Debug print helper */ $print(name: string, i: string | number, args: any[], color?: boolean, shell?: boolean): void; /** Retrieves information about this collections indexes. */ getIndexes(): ReturnType<mongodb.Collection<T>['indexInformation']>; } let Collection: Collection;}
mongoose

Version Info

Tagged at
a year ago