Files
music-repo/packages/common/src/index.ts
2024-12-25 22:32:33 +01:00

26 lines
912 B
TypeScript

import * as Brand from "./Brand";
export type UUID = Brand.Branded<string, "UUID">;
export const UUID = Brand.nominal<UUID>();
export type Sha256 = Brand.Branded<Uint8Array, "Sha256">;
export const Sha256 = Brand.nominal<Sha256>();
export type AttachmentId = Brand.Branded<UUID, "AttachmentId">;
export const AttachmentId = Brand.nominal<AttachmentId>();
export type PieceId = Brand.Branded<UUID, "PieceId">;
export const PieceId = Brand.nominal<PieceId>();
export type RepertoireId = Brand.Branded<UUID, "RepertoireId">;
export const RepertoireId = Brand.nominal<RepertoireId>();
export type RequestId = Brand.Branded<UUID, "RequestId">;
export const RequestId = Brand.nominal<RequestId>();
export type SessionId = Brand.Branded<string, "SessionId">;
export const SessionId = Brand.nominal<SessionId>();
export type UserId = Brand.Branded<UUID, "UserId">;
export const UserId = Brand.nominal<UserId>();