feat(): v2 public websockets & reusable base class for websockets
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { WebsocketClient, WsClientEvent } from '../src';
|
||||
import { WebsocketClient } from '../src';
|
||||
|
||||
export function getSilentLogger(logHint?: string) {
|
||||
return {
|
||||
@@ -20,6 +20,15 @@ export const fullLogger = {
|
||||
error: (...params) => console.error('error', ...params),
|
||||
};
|
||||
|
||||
type WsClientEvent =
|
||||
| 'open'
|
||||
| 'update'
|
||||
| 'close'
|
||||
| 'exception'
|
||||
| 'reconnect'
|
||||
| 'reconnected'
|
||||
| 'response';
|
||||
|
||||
/** Resolves a promise if an event is seen before a timeout (defaults to 4.5 seconds) */
|
||||
export function waitForSocketEvent(
|
||||
wsClient: WebsocketClient,
|
||||
|
||||
Reference in New Issue
Block a user