File tree 2 files changed +56
-1
lines changed
2 files changed +56
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ declare module "mongodb" {
9
9
10
10
public db ( dbName : string ) : Db ;
11
11
12
- public open ( callback : ( err , result ) => void ) ;
12
+ public open ( callback : ( err : Error , db : Db ) => void ) ;
13
13
public close ( forceClose ?: bool , callback ?: ( err : any , result : any ) => void ) ;
14
14
public admin ( callback : ( err , result ) => void ) : any ;
15
15
public collectionsInfo ( collectionName : string , callback ?: ( err , result ) => void ) ;
Original file line number Diff line number Diff line change
1
+ declare module "q" {
2
+ export class deferred {
3
+ promise : makePromise ;
4
+ public resolve ( resolvedValue ) : any ;
5
+ public reject ( exception ) : any ;
6
+ public notify ( ) : void ;
7
+ }
8
+
9
+ export function defer ( ) : deferred ;
10
+
11
+ export class makePromise {
12
+ constructor ( descriptor , fallback , valueOf , exception ) ;
13
+
14
+ public then ( fulfilled ? , rejected ? , progressed ? ) : makePromise ;
15
+
16
+ public isResolved ( ) : bool ;
17
+ public isFulfilled ( ) : bool ;
18
+ public isRejected ( ) : bool ;
19
+ public when ( fulfilled ?, rejected ?, progressed ?) : makePromise ;
20
+ public spread ( fulfilled ?, rejected ?) : makePromise ;
21
+ public send ( op ) : makePromise ;
22
+ public get ( ) : makePromise ;
23
+ public put ( ) : makePromise ;
24
+ public del ( ) : makePromise ;
25
+ public post ( ) : makePromise ;
26
+ public invoke ( name /*, args...*/ ) ;
27
+ public keys ( ) ;
28
+ public apply ( ) ;
29
+ public call ( ) ;
30
+ public bind ( ) ;
31
+ public fapply ( ) ;
32
+ public fcall ( ) ;
33
+ public fbind ( ) ;
34
+ public all ( ) ;
35
+ public allResolved ( ) ;
36
+ public view ( ) ;
37
+ public viewInfo ( ) ;
38
+ public timeout ( ) ;
39
+ public delay ( ) ;
40
+ public catch ( ) ;
41
+ public finally ( ) ;
42
+ public fail ( ) ;
43
+ public fin ( ) ;
44
+ public progress ( ) ;
45
+ public end ( ) ;
46
+ public ncall ( ) ;
47
+ public napply ( ) ;
48
+ public nbind ( ) ;
49
+ public npost ( ) ;
50
+ public ninvoke ( ) ;
51
+ public nend ( ) ;
52
+ }
53
+
54
+ export function when ( promise : makePromise , fulfilled , rejected , progressed ) : makePromise ;
55
+ }
You can’t perform that action at this time.
0 commit comments