socket.io-client icon indicating copy to clipboard operation
socket.io-client copied to clipboard

fix types socket has no property of on

Open guyue88 opened this issue 3 years ago • 0 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/socket.io-client/build/socket.d.ts b/node_modules/socket.io-client/build/socket.d.ts
index b23b738..71c3841 100644
--- a/node_modules/socket.io-client/build/socket.d.ts
+++ b/node_modules/socket.io-client/build/socket.d.ts
@@ -1,5 +1,5 @@
 import { Packet } from "socket.io-parser";
-import Emitter = require("component-emitter");
+import Emitter from "component-emitter";
 import { Manager } from "./manager";
 export interface SocketOptions {
     /**

This issue body was partially generated by patch-package.

guyue88 avatar Jul 11 '22 03:07 guyue88