Skip to content

Commit bd413f3

Browse files
committed
- Small change in mongodb
- Started "q" definitions
1 parent 7fb8b72 commit bd413f3

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

mongodb.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ declare module "mongodb" {
99

1010
public db(dbName: string): Db;
1111

12-
public open(callback: (err, result) => void );
12+
public open(callback: (err : Error, db : Db) => void );
1313
public close(forceClose?: bool, callback?: (err: any, result: any) => void );
1414
public admin(callback: (err, result) => void ): any;
1515
public collectionsInfo(collectionName: string, callback?: (err, result) => void );

q.d.ts

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
}

0 commit comments

Comments
 (0)