@squidcloud/client
Version:
A typescript implementation of the Squid client
25 lines (24 loc) • 960 B
TypeScript
import { Observable } from 'rxjs';
import { ClientId } from '../../internal-common/src/public-types/communication.public-types';
/**
* Provides information about the connection to the Squid Server.
* @category Platform
*/
export declare class ConnectionDetails {
private readonly clientIdService;
private readonly socketManager;
private isConnected;
/** Whether the Squid Client SDK is currently connected to the Squid Server. */
get connected(): boolean;
/**
* A unique client ID that is assigned to the client. This client ID is also available to the different backend
* function in the context object.
* Note: The client ID may change after a long disconnect.
*/
get clientId(): ClientId;
/**
* Returns an observable that emits true when the client is connected to the server and false when the client is
* disconnected from the server.
*/
observeConnected(): Observable<boolean>;
}