Files
Catalan Lover e635ac93eb Update @types/node to 24.12.4 and @sinclair/typebox to 0.34.49 (#1150)
Renovate failed to generate this artefact so i had to manually go and do it. Something about our monorepo setup is pissing Renovate off and making it not work.
2026-05-21 21:29:36 +00:00
..
2026-05-07 14:01:00 +01:00
2026-03-19 16:13:14 +00:00
2026-03-19 16:13:14 +00:00
2026-03-19 16:13:14 +00:00
2026-03-19 16:13:14 +00:00
2026-03-19 16:13:14 +00:00

Matrix basic types

Do you type Matrix roomIDs, userIDs, and eventIDs as string?

Have you ever accidentally mixed the two up?

Well fear no more, this library provides distinct types for each kind of identifier, and also a wrapper for the various ways of referring to rooms.

async function acceptInvitation(
  inviteSender: StringUserID,
  room: MatrixRoomID
): Promise<Result<void>> {
  console.log(
    `accepting invitation from ${inviteSender} to ${room.toPermalink()}`
  );
  return await client.joinRoom(room.toRoomIDOrAlias(), room.getViaServers());
}