UNPKG

fcr-core

Version:

Core APIs for building online scenes

26 lines (25 loc) 1.1 kB
import { FcrPlatform, FcrUserInfo } from '../type'; export declare class FcrRoomCache { private _platformMapByUserId; private _avatarMapByUserId; private _userMapByUserId; get userList(): FcrUserInfo[]; get userMapByUserId(): Map<string, FcrUserInfo>; setUserMapByUserId: (userId: string, user: FcrUserInfo) => void; deleteUserMapByUserId: (userId: string) => void; setUserList: (userList: FcrUserInfo[]) => void; insertUserToList: (index: number, user: FcrUserInfo) => void; deleteUserList: (index: number) => void; addUserToList: (user: FcrUserInfo) => void; getUserPlatform: (userId: string) => FcrPlatform | undefined; getUserAvatar: (userId: string) => string | undefined; setUserPlatform: (userId: string, platform: FcrPlatform) => void; setUserAvatar: (userId: string, avatar: string) => void; deleteUserPlatform: (userId: string) => void; deleteUserAvatar: (userId: string) => void; clear: () => void; } export declare class FcrSharedCache { private _roomCache; getRoomCache: (roomId: string) => FcrRoomCache; }