// Presence Utility Types // --------------------- import type { Expand } from './queryTypes.ts'; import type { EntityDef, ResolveEntityAttrs, RoomsDef } from './schemaTypes.ts'; type ExtractPresenceAttrs = PresenceEntity extends EntityDef ? ResolveEntityAttrs : never; export type PresencePeer< Schema extends { rooms: RoomsDef }, RoomType extends Extract, > = Expand< ExtractPresenceAttrs & { peerId: string; } >;