Skip to content

Commit

Permalink
docs(examples): update TypeScript example
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Dec 30, 2020
1 parent 178e899 commit 292d62e
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 29 deletions.
5 changes: 2 additions & 3 deletions examples/typescript/client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Manager } from "socket.io-client";
import { io } from "socket.io-client";

const manager = new Manager("ws://localhost:8080");
const socket = manager.socket("/");
const socket = io("ws://localhost:8080/", {});

socket.on("connect", () => {
console.log(`connect ${socket.id}`);
Expand Down
70 changes: 46 additions & 24 deletions examples/typescript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"author": "Damien Arrachequesne",
"license": "MIT",
"dependencies": {
"socket.io": "^3.0.1",
"socket.io-client": "^3.0.1",
"socket.io": "^3.0.4",
"socket.io-client": "^3.0.4",
"ts-node": "^9.0.0",
"typescript": "^4.0.5"
}
Expand Down

0 comments on commit 292d62e

Please sign in to comment.