File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,12 @@ import type { Db } from '../db';
7
7
import type { ClientSession } from '../sessions' ;
8
8
9
9
/** @public */
10
- export type ListDatabasesResult = string [ ] | Document [ ] ;
10
+ export interface ListDatabasesResult {
11
+ databases : ( { name : string ; sizeOnDisk ?: number ; empty ?: boolean } & Document ) [ ] ;
12
+ totalSize ?: number ;
13
+ totalSizeMb ?: number ;
14
+ ok : 1 | 0 ;
15
+ }
11
16
12
17
/** @public */
13
18
export interface ListDatabasesOptions extends CommandOperationOptions {
Original file line number Diff line number Diff line change
1
+ import { expectType } from 'tsd' ;
2
+ import { Document , MongoClient } from '../../src/index' ;
3
+
4
+ const client = new MongoClient ( '' ) ;
5
+ const admin = client . db ( ) . admin ( ) ;
6
+
7
+ expectType < {
8
+ databases : ( { name : string ; sizeOnDisk ?: number ; empty ?: boolean } & Document ) [ ] ;
9
+ totalSize ?: number ;
10
+ totalSizeMb ?: number ;
11
+ ok : 1 | 0 ;
12
+ } > ( await admin . listDatabases ( ) ) ;
You can’t perform that action at this time.
0 commit comments