File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -319,11 +319,11 @@ function parseCliConfig(args: string[]): CliOptions {
319319 return parsed ;
320320}
321321
322- export function warnAboutDeprecatedOrUnknownCliArgs ( args : object , warn : ( msg : string ) => void ) : void {
322+ export function warnAboutDeprecatedOrUnknownCliArgs ( args : Record < string , unknown > , warn : ( msg : string ) => void ) : void {
323323 let usedDeprecatedArgument = false ;
324324 let usedInvalidArgument = false ;
325325
326- const knownArgs = args as UserConfig & CliOptions ;
326+ const knownArgs = args as unknown as UserConfig & CliOptions ;
327327 // the first position argument should be used
328328 // instead of --connectionString, as it's how the mongosh works.
329329 if ( knownArgs . connectionString ) {
Original file line number Diff line number Diff line change @@ -660,7 +660,7 @@ describe("CLI arguments", () => {
660660 cliArgs = { [ cliArg ] : "RandomString" } as unknown as CliOptions & UserConfig & { _ ?: string [ ] } ;
661661 warn = vi . fn ( ) ;
662662
663- warnAboutDeprecatedOrUnknownCliArgs ( cliArgs , warn ) ;
663+ warnAboutDeprecatedOrUnknownCliArgs ( cliArgs as unknown as Record < string , unknown > , warn ) ;
664664 } ) ;
665665
666666 it ( `warns the usage of ${ cliArg } as it is deprecated` , ( ) => {
You can’t perform that action at this time.
0 commit comments