mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #26551 from moimael/fix-koa-websocket-types
[koa-websocket] Support passing ws options to listen.
This commit is contained in:
Vendored
+3
-3
@@ -1,6 +1,6 @@
|
||||
// Type definitions for koa-websocket 2.1
|
||||
// Type definitions for koa-websocket 5.0
|
||||
// Project: https://github.com/kudos/koa-websocket
|
||||
// Definitions by: My Self <https://github.com/me>
|
||||
// Definitions by: Maël Lavault <https://github.com/moimael>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -21,7 +21,7 @@ declare class KoaWebsocketServer {
|
||||
middleware: Koa.Middleware[];
|
||||
|
||||
constructor(app: Koa);
|
||||
listen(server: http.Server | https.Server): ws.Server;
|
||||
listen(options: ws.ServerOptions): ws.Server;
|
||||
onConnection(handler: KoaWebsocketConnectionHandler): void;
|
||||
use(middleware: KoaWebsocketMiddleware): this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user