Closed endel closed 1 year ago
It has to be like this
listen_unix(options: ListenOptions, cb: (listenSocket: us_listen_socket | false) => void | Promise<void>, path: RecognizedString) : TemplatedApp;
Hi @uNetworkingAB, maybe we need 2 overloads for listen_unix
, then?
Correct me if I'm wrong but by reading the source I don't see ListenOptions
, I could only notice:
Perhaps we can have the signature I proposed + another with options
as the second argument?
// 2 args
listen_unix(cb: (listenSocket: us_listen_socket) => void | Promise<void>, path: RecognizedString) : TemplatedApp;
// 3 args
listen_unix(cb: (listenSocket: us_listen_socket) => void | Promise<void>, options: ListenOptions, path: RecognizedString) : TemplatedApp;
Cheers
Ah
https://github.com/uNetworking/uWebSockets.js/issues/815