Skip to content

Commit 664ca52

Browse files
committed
fix: comments
1 parent 262ca08 commit 664ca52

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

package-lock.json

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"socks": "^2.8.1",
108108
"source-map-support": "^0.5.21",
109109
"ts-node": "^10.9.2",
110-
"tsd": "^0.31.2",
110+
"tsd": "^0.32.0",
111111
"typescript": "5.8.3",
112112
"typescript-cached-transpile": "^0.0.6",
113113
"v8-heapsnapshot": "^1.3.1",

src/connection_string.ts

+2
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,8 @@ function setOption(
605605
if (values[0] == null) {
606606
break;
607607
}
608+
// The value should always be a string here, but since the array is typed as unknown
609+
// there still needs to be an explicit cast.
608610
// eslint-disable-next-line @typescript-eslint/no-base-to-string
609611
mongoOptions[name] = String(values[0]);
610612
break;

src/operations/distinct.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ export class DistinctOperation extends CommandOperation<any[]> {
9696

9797
const result = await super.executeCommand(server, session, cmd, timeoutContext);
9898

99-
return this.explain ? (result as any[]) : result.values;
99+
// @ts-expect-error Explain always returns a document
100+
return this.explain ? result : result.values;
100101
}
101102
}
102103

0 commit comments

Comments
 (0)