summaryrefslogtreecommitdiff
path: root/examples/ws.ts
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ws.ts')
-rw-r--r--examples/ws.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/ws.ts b/examples/ws.ts
index bc2a7bd0b..f25a15687 100644
--- a/examples/ws.ts
+++ b/examples/ws.ts
@@ -6,7 +6,7 @@ import {
isWebSocketPingEvent
} from "https://deno.land/x/ws/mod.ts";
-async function main() {
+async function main(): Promise<void> {
console.log("websocket server is running on 0.0.0.0:8080");
for await (const req of serve("0.0.0.0:8080")) {
if (req.url === "/ws") {
@@ -22,7 +22,7 @@ async function main() {
// binary message
console.log("ws:Binary", ev);
} else if (isWebSocketPingEvent(ev)) {
- const [_, body] = ev;
+ const [, body] = ev;
// ping
console.log("ws:Ping", body);
} else if (isWebSocketCloseEvent(ev)) {