Skip to content

Commit

Permalink
fix!: flawed color type
Browse files Browse the repository at this point in the history
BREAKING CHANGE: removes hexColor type
  • Loading branch information
NanderTGA committed Mar 2, 2024
1 parent d2e4d67 commit 6789ed3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/types/socket.io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,20 @@ export default MsgroomSocket;
export type ServerToClientEventNames = EventNames<ServerToClientEvents> | keyof SocketReservedEvents;
export type ClientToServerEventNames = EventNames<ClientToServerEvents>;

/**
* Hexadecimal color string
* @example "#ff0000"
*/
export type hexColor = `#${string}`;

export type flag = "staff" | "bot";

export interface RawUser {
color: hexColor;
/** A css color. */
color: string;
flags: flag[];
id: string;
session_id: string;
user: string;
}

export interface RawMessage {
color: hexColor;
/** A css color. */
color: string;
content: string;
date: string;
id: string;
Expand Down

0 comments on commit 6789ed3

Please sign in to comment.