Closed akdor1154 closed 7 years ago
Unfortunately, no. I believe you're referring to https://github.com/types/npm-ldapjs/blob/679663089ebdf59a4194f5e03271465ccbf4fe8b/lib/client/client.d.ts#L3 (which is TLSSocketOptions
and not connection options). You can make a PR to DefinitelyTyped to fix it, because the equivalent interface is actually unnamed on DefinitelyTyped (see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/37bd54827abff2c86e0ea28d7ba49f7760237cc8/node/node.d.ts#L2802).
Let me know if I got the interface name wrong, I just did a search and didn't find any other usage of tls
.
@blakeembrey are you able to continue the chat on the typescript gitter or should I reply here?
I just checked the conversation on Gitter and didn't see anything that needed attention. I'm usually better at responding async. I see the bug with this library is using the wrong interface. Given that, I'm not sure there's anyway to make it compatible with DefinitelyTyped without breaking env~node
now. You could try renaming the interface with DefinitelyTyped to be ConnectOptions
instead of TLSConnectionOptions(at the very least, it'd be making DefinitelyTyped more consistent as the method _is_ called
connectand not
connection` - also DefinitelyTyped is centralised, so you know it will or won't break other people).
Cool, thanks for the response. Is there any game plan for making env-node
and @types/node
compatible / integrated in the mid to far future?
Yes, we're waiting for TypeScript. See https://github.com/Microsoft/types-publisher/issues/4. You're welcome to chime in, you're not alone in waiting 😄
woo thanks
@akdor1154 Is there any reason you want to "mix" npm and registry typings? Normally I would recommend one or the other.
If there is anything wrong in these typings let me know
@types/node
(the typings from definitelytyped) specify tls connection options asConnectionOptions from 'tls'
, however typings'env-node
specifies the same thing asTLSConnectionOptions from 'tls'
.As a result this package cannot be used with
@types/node
. This is the single definition preventing use - my fork at akdor1154/npm-ldapjs can be installed without anytypings
types installed, however I assume this fork no longer works withtypings
due to my simple 'fix' ofs/TLSConnectionOptions/ConnectionOptions
.Is there any way for this package to be compatible with both?