cloudfunctions/SegmentPortraitPic/node_modules/@cloudbase/database/dist/commonjs/realtime/virtual-websocket-client.d.ts

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

import { IResponseMessage } from '../typings/realtime';
import { RealtimeListener } from './listener';
import { IWSSendOptions } from './websocket-client';
import { IWatchOptions } from '../typings/index';
interface IVirtualWebSocketClientConstructorOptions extends IWatchOptions {
    envId?: string;
    collectionName: string;
    query: string;
    limit?: number;
    orderBy?: Record<string, string>;
    send: <T = any>(opts: IWSSendOptions) => Promise<T>;
    login: (envId?: string, refresh?: boolean) => Promise<any>;
    isWSConnected: () => boolean;
    onceWSConnected: () => Promise<void>;
    getWaitExpectedTimeoutLength: () => number;
    onWatchStart: (client: VirtualWebSocketClient, queryID: string) => void;
    onWatchClose: (client: VirtualWebSocketClient, queryID: string) => void;
    debug?: boolean;
}
export declare class VirtualWebSocketClient {
    watchId: string;
    private envId?;
    private collectionName;
    private query;
    private limit;
    private orderBy;
    private send;
    private login;
    private isWSConnected;
    private onceWSConnected;
    private getWaitExpectedTimeoutLength;
    private onWatchStart;
    private onWatchClose;
    private debug?;
    listener: RealtimeListener;
    private watchStatus;
    private _availableRetries;
    private _ackTimeoutId?;
    private _initWatchPromise?;
    private _rebuildWatchPromise?;
    private sessionInfo?;
    private _waitExpectedTimeoutId?;
    constructor(options: IVirtualWebSocketClientConstructorOptions);
    private _login;
    private initWatch;
    private rebuildWatch;
    private handleWatchEstablishmentError;
    private closeWatch;
    private scheduleSendACK;
    private clearACKSchedule;
    private sendACK;
    private handleCommonError;
    private useRetryTicket;
    private handleServerEvents;
    private _handleServerEvents;
    private _postHandleServerEventsValidityCheck;
    private clearWaitExpectedEvent;
    onMessage(msg: IResponseMessage): void;
    closeWithError(error: any): void;
    pause(): void;
后面还有 3 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。