RelayNotice beta
TypeAlias of @v12-engine/engine
ts
export type RelayNotice =
/** To a sharing page: it shares under `key` now */
{
type: 'shared';
key: string;
}
/** To a sharing page: another page shares under that key already */
| {
type: 'taken';
key: string;
}
/** To a sharing page: someone watches, by the id the relay gave them */
| {
type: 'watcher';
id: number;
}
/** To a sharing page: what a watcher said (that it got a tick, a ping) */
| {
type: 'from';
watcher: number;
text: string;
}
/** To a sharing page: a watcher left */
| {
type: 'gone';
watcher: number;
}
/** To a watcher: nothing is shared under the key right now. The game comes once it is */
| {
type: 'waiting';
key: string;
}
/** To a watcher: the game shared ended. The next one under the key comes when it is shared */
| {
type: 'ended';
key: string;
};What the relay tells pages besides the game itself