Open haci-xplora opened 1 year ago
@haci-xplora this is a type issue, could you please send a PR to fix it?
hi Robert.
the type of handle
function is based on the signature of implementation, so it is correct. but if request parameter (IncomingMessage
) is not in use (as I can see it is not used), it should be omitted. that is why it should not be assigned as listener of net server. shall I do that and remove request parameter?
or we can make it optional/nullable.
otherwise, multiple adapter clients are needed for net
server, and other servers like websocket
server.
see Client.md
it says request parameter is for that.
one class cannot handle those variations well.
let me create a PR and discuss further.
request parameter is now optional
System Information
Describe the bug Function
aedes.handle
is not compatible with listener fornet.createServer
. So, it causes TypeScript compile error.Sample code:
Error:
To Reproduce Steps to reproduce the behavior is not much different than the sample code on Examples page
Expected behavior Project should compile as expected without any errors.