Skip to content

Commit

Permalink
fix types: use Record instead of Map (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia authored Aug 13, 2023
1 parent 2798750 commit 0d9e9b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
4.1.0
=====

* Fix types: use `Record` instead of `Map` for publication tags and `clients` field of `PresenceResult`.

4.0.1
=====

Expand Down
6 changes: 3 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export interface PublicationContext {
data: any;
info?: ClientInfo;
offset?: number;
tags?: Map<string, string>;
tags?: Record<string, string>;
}

export interface ClientInfo {
Expand Down Expand Up @@ -243,7 +243,7 @@ export interface ServerPublicationContext {
data: any;
info?: ClientInfo;
offset?: number;
tags?: Map<string, string>;
tags?: Record<string, string>;
}

export interface ServerJoinContext {
Expand Down Expand Up @@ -289,7 +289,7 @@ export interface RpcResult {
}

export interface PresenceResult {
clients: Map<string, ClientInfo>;
clients: Record<string, ClientInfo>;
}

export interface PresenceStatsResult {
Expand Down

0 comments on commit 0d9e9b7

Please sign in to comment.