1 | declare module 'mongoose' {
|
2 | import mongodb = require('mongodb');
|
3 |
|
4 | type ClientSessionOptions = mongodb.ClientSessionOptions;
|
5 | type ClientSession = mongodb.ClientSession;
|
6 |
|
7 | |
8 |
|
9 |
|
10 |
|
11 |
|
12 | function startSession(options: ClientSessionOptions | undefined | null, callback: Callback<ClientSession>): void;
|
13 | function startSession(callback: Callback<ClientSession>): void;
|
14 | function startSession(options?: ClientSessionOptions): Promise<ClientSession>;
|
15 |
|
16 | interface SessionOperation {
|
17 |
|
18 | session(session: mongodb.ClientSession | null): this;
|
19 | }
|
20 |
|
21 | interface SessionStarter {
|
22 |
|
23 | |
24 |
|
25 |
|
26 |
|
27 |
|
28 | startSession(options: ClientSessionOptions | undefined | null, callback: Callback<ClientSession>): void;
|
29 | startSession(callback: Callback<ClientSession>): void;
|
30 | startSession(options?: ClientSessionOptions): Promise<ClientSession>;
|
31 | }
|
32 |
|
33 | interface SessionOption {
|
34 | session?: ClientSession | null;
|
35 | }
|
36 | }
|