-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: Authentication, Connection Layer
What problem are you facing?
// options: ConnectionOptions // The options need to be filtered properly, Connection options differ from Command options const handshakeOptions: CommandOptions = { ...options }; // ^? Type '{ id: number | "<monitor>"; generation: number; hostAddress: HostAddress; autoEncrypter?: AutoEncrypter | undefined; serverApi?: ServerApi | undefined; ... 38 more ...; proxyPassword?: string | undefined; }' is not assignable to type 'CommandOptions'
While cleaning up legacy Object.assign invocations which hide typescript errors, it was identified that the options passed to connection.command for the handshake are all the options that are specified for connecting. There are connect options from Node.js that use the same name as options we would pass to command. Example: "session" which represents a TLS Session but is the same name for a ClientSession option.