Open capaj opened 1 month ago
Can you rephrase the question?
I tried to rephrase the title. Was that what you meant?
No, the issue you are reporting is not clear to me, maybe I haven't had enough coffee yet today. I have no issues calling setMaxListeners.
are you using typescript? For me it is saying this
I have the binance 2.12.2
Oddly enough, if I test this in the examples folder, I don't have that issue:
I've also tried it in a separate project, with the latest version of this SDK imported, and no issue there either - runs without issues:
No build warnings either...
Could you reproduce this issue in a really tiny ts project?
I am using bun, this is my tsconfig
{
"compilerOptions": {
"module": "ESNext",
"esModuleInterop": true,
"target": "ESNext",
"moduleResolution": "Bundler",
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"isolatedModules": false,
"strict": true,
"noImplicitAny": true,
"noEmit": true,
"useUnknownInCatchVariables": false,
"skipLibCheck": true,
"inlineSourceMap": true,
"resolveJsonModule": true,
"types": ["bun-types"]
},
"exclude": ["dashboard/"],
"lib": ["esnext", "es2021"]
}
that could mess up with those event listener types, will try to create a repro or I can invite you to the private repo where I have it
Interesting, could also be bun itself - would be curious to understand what's happening here and how to resolve it. Ideal would be to create a really tiny project with no real code in it to reproduce it - just the few lines causing this and the minimal boilerplate required (such as the tsconfig) to reproduce it. Then we start chopping away until we find what's causing it.
incorrect TS types: WebsocketClient instance extends event emitter at runtime, types do not. This ts-expect-error should not be necessary