Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

the-draupnir-project/matrix-basic-types

Repository files navigation

Warning

@the-draupnir-project/matrix-basic-types now lives in the Draupnir monorepo

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());
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors