Seems like the error callback is malformatted (#12477)

* Seems like the error callback is malformatted

New to typescript, but it complains on my cb function since it expects an error argument and doesn't return an object.

I proposed these changes, but haven't done any typescripting really (trying to migrate to TS), so feel free to deny this PR if it's wrong.
I did check with the source code in ws before suggesting this though.

* Updated argument with an optional any type
This commit is contained in:
Marcus Nielsen
2016-11-13 10:41:42 +01:00
committed by Masahiro Wakame
parent b56627a8f9
commit 4d7168f75d

2
ws/index.d.ts vendored
View File

@@ -135,7 +135,7 @@ declare namespace WebSocket {
constructor(options?: IServerOptions, callback?: Function);
close(cb?: () => {}): void;
close(cb?: (err?: any) => void): void;
handleUpgrade(request: http.IncomingMessage, socket: net.Socket,
upgradeHead: Buffer, callback: (client: WebSocket) => void): void;