`fn` type bound in `Server.register` might be slightly off
The type bound for fn in register has a void return type:
https://github.com/elpheria/rpc-websockets/blob/46b0190bc0ecdce4236b7ccbe93b5e687a5aaf09/src/lib/server.ts#L147
I'm rather new to TypeScript, but I would suggest a return type of unknown | Promise<unknown> to hint that the function is await'd later on:
https://github.com/elpheria/rpc-websockets/blob/46b0190bc0ecdce4236b7ccbe93b5e687a5aaf09/src/lib/server.ts#L697-L698
Hi, @SamWilsn, are there any issues you came across in production that's touching on this code?
are there any issues you came across in production that's touching on this code?
Here's an example:
https://github.com/wallet-test-framework/glue-ws/blob/0322225d8979f2d3995efb1d703d98c6f672f75d/src/index.ts#L68-L70
I have to disable the @typescript-eslint/no-misused-promises lint because the function doesn't declare that it may return a Promise.