TS4031
Public property 'socket' of exported class has or is using private name 'ReconnectingWebSocket'.
Broken Code ❌
import ReconnectingWebSocket from 'reconnecting-websocket';
class MyClass {
public socket: ReconnectingWebSocket | undefined;
}Fixed Code ✔️
Employ the typeof keyword to use the type of your import:
import ReconnectingWebSocket from 'reconnecting-websocket';
class MyClass {
public socket: typeof ReconnectingWebSocket | undefined;
}