mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-28 07:58:10 +08:00
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:
committed by
Masahiro Wakame
parent
b56627a8f9
commit
4d7168f75d
2
ws/index.d.ts
vendored
2
ws/index.d.ts
vendored
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user