mirror of
https://github.com/wassname/talk.git
synced 2026-08-03 13:20:59 +08:00
fix: modified uri parsing for mongodb (#2282)
This commit is contained in:
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
declare module "mongodb-core" {
|
||||
export interface ParsedConnectionString {
|
||||
hosts: string[];
|
||||
auth: {};
|
||||
options: {};
|
||||
}
|
||||
|
||||
export interface ParseConnectionStringOptions {
|
||||
/**
|
||||
* Whether the parser should translate options back into camelCase after normalization.
|
||||
*/
|
||||
caseTranslate?: boolean;
|
||||
}
|
||||
|
||||
/** https://github.com/mongodb-js/mongodb-core/blob/master/lib/uri_parser.js */
|
||||
export function parseConnectionString(
|
||||
uri: string,
|
||||
options?: ParseConnectionStringOptions,
|
||||
callback?: (error: Error, result: ParsedConnectionString) => void
|
||||
): void;
|
||||
export function parseConnectionString(
|
||||
uri: string,
|
||||
callback?: (error: Error, result: ParsedConnectionString) => void
|
||||
): void;
|
||||
}
|
||||
Reference in New Issue
Block a user