@@ -2,6 +2,7 @@ export as namespace nb;
22
33import * as fs from 'fs' ;
44import * as mongodb from 'mongodb' ;
5+ import * as mongo_utils from '../util/mongo_utils' ;
56import { EventEmitter } from 'events' ;
67import { Readable , Writable } from 'stream' ;
78import { IncomingMessage , ServerResponse } from 'http' ;
@@ -46,7 +47,7 @@ interface Base {
4647 toString ?( ) : string ;
4748}
4849
49- type ID = mongodb . ObjectID ;
50+ type ID = string ;
5051type DBBuffer = mongodb . Binary | Buffer ;
5152
5253interface System extends Base {
@@ -719,8 +720,8 @@ interface DBClient {
719720 populate ( docs : object [ ] | object , doc_path : string , collection : DBCollection , fields : object ) : Promise < object [ ] | object > ;
720721 resolve_object_ids_recursive ( idmap : object , item : object ) : object ;
721722 resolve_object_ids_paths ( idmap : object , item : object , paths : string [ ] , allow_missing : boolean ) : object ;
722- new_object_id ( ) : mongodb . ObjectId ;
723- parse_object_id ( id_str : string ) : mongodb . ObjectId ;
723+ new_object_id ( ) : mongo_utils . ObjectId ;
724+ parse_object_id ( id_str : string ) : mongo_utils . ObjectId ;
724725 fix_id_type ( doc : object [ ] | object ) : object [ ] | object ;
725726 is_object_id ( id : object [ ] | object ) : boolean ;
726727 is_err_duplicate_key ( err : object ) : boolean ;
0 commit comments