I'm using a custom library that implements a connection to a WebSocket, that was written in TypeScript.
It works fine in a React app which is also using TypeScript but when I try to use it on a very simple node express client, I get the error that WebSocket is not defined on the lib.
const socket = new WebSocket(this.config.endpoint.href);
ReferenceError: WebSocket is not defined