GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(typings): export Socket class · socketio/socket.io@0d74f29

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • index.ts
  • test
    • socket.io.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/index.ts‎

Copy file name to clipboardExpand all lines: lib/index.ts
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,3 +709,5 @@ emitterMethods.forEach(function(fn) {
709709

710710
module.exports = (srv?, opts?) => new Server(srv, opts);
711711
module.exports.Server = Server;
712+
713+
export { Socket }; // for "connect" event typing
Collapse file

‎test/socket.io.ts‎

Copy file name to clipboardExpand all lines: test/socket.io.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
import { Server } from "..";
3+
import { Server, Socket } from "..";
44
import { createServer } from "http";
55
import fs = require("fs");
66
import { join } from "path";
@@ -357,7 +357,7 @@ describe("socket.io", () => {
357357
const sio = new Server(srv);
358358
srv.listen(() => {
359359
const socket = client(srv);
360-
sio.on("connection", socket => {
360+
sio.on("connection", (socket: Socket) => {
361361
expect(socket).to.be.a(Socket);
362362
done();
363363
});

0 commit comments

Comments
0 (0)
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.