Skip to content

Commit a57376f

Browse files
committed
chore: fix linter complains
1 parent 66c8d2f commit a57376f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/common/config.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const ALL_CONFIG_KEYS = new Set(
9797
.concat(OPTIONS.array)
9898
.concat(OPTIONS.boolean)
9999
.concat(Object.keys(OPTIONS.alias))
100-
) as Set<string>;
100+
);
101101

102102
export function validateConfigKey(key: string): { valid: boolean; suggestion?: string } {
103103
if (ALL_CONFIG_KEYS.has(key)) {
@@ -319,19 +319,14 @@ function parseCliConfig(args: string[]): CliOptions {
319319
return parsed;
320320
}
321321

322-
export function warnAboutDeprecatedOrUnknownCliArgs(
323-
args: CliOptions &
324-
UserConfig & {
325-
_?: string[];
326-
} & any,
327-
warn: (msg: string) => void
328-
): void {
322+
export function warnAboutDeprecatedOrUnknownCliArgs(args: object, warn: (msg: string) => void): void {
329323
let usedDeprecatedArgument = false;
330324
let usedInvalidArgument = false;
331325

326+
const knownArgs = args as UserConfig & CliOptions;
332327
// the first position argument should be used
333328
// instead of --connectionString, as it's how the mongosh works.
334-
if (args.connectionString) {
329+
if (knownArgs.connectionString) {
335330
usedDeprecatedArgument = true;
336331
warn(
337332
"The --connectionString argument is deprecated. Prefer using the first positional argument for the connection string or the MDB_MCP_CONNECTION_STRING environment variable."

0 commit comments

Comments
 (0)