Open danthegoodman1 opened 10 months ago
We are also experiencing this issue, if we use new WebSocket()
then we get
This expression is not constructable.
Type 'typeof import("/PATH/TO/REPO/node_modules/@types/ws/index")' has no construct signatures.
is this still affecting you in Bun 1.1.31? i get the following:
import WebSocket from "ws";
const dgWS = new WebSocket("wss://api.deepgram.com/v1/listen", {
headers: {
"Authorization": `Bearer ${process.env.DEEPGRAM_KEY}`,
},
});
What version of Bun is running?
1.0.21+837cbd60d
What platform is your computer?
maxos x86
What steps can reproduce the bug?
The second parameter of websocket initialization does not reflect the docs, and if I add a
// @ts-expect-error
it works fine.What is the expected behavior?
https://bun.sh/docs/api/websockets#connect-to-a-websocket-server
What do you see instead?
No response
Additional information
is a temporary workaround