# Function: getCurrentRoom

getCurrentRoom(): Promise‹ReadonlyWithExtensions‹Room› | null›

返回当前房间的只读实例,若不存在房间则返回null

example

// 在头部引入账号模块
import { matchSystem } from "@timi/mogs-sdk";
...
// 使用
const room = await matchSystem.getCurrentRoom();
if (room !== null) {
  const { groupList } = room;
}
1
2
3
4
5
6
7
8

# 返回值:

Promise‹ReadonlyWithExtensions‹Room› | null›