Skip to content

Commit

Permalink
Merge pull request #304 from yenio/fix-typescript-events
Browse files Browse the repository at this point in the history
Fix types for channel, member, and user values in Event interface
  • Loading branch information
vishalnarkhede authored May 15, 2020
2 parents 78a59d3 + f7967f3 commit 891b01c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions types/stream-chat/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export interface Event<T = string> {
type: T;
message?: MessageResponse;
reaction?: ReactionResponse;
channel?: Channel;
member?: User;
user?: User;
channel?: ChannelResponse;
member?: ChannelMemberResponse;
user?: UserResponse;
user_id?: string;
me?: OwnUserResponse;
watcher_count?: number;
Expand Down
4 changes: 2 additions & 2 deletions types/stream-chat/test-stream-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ const event = {
updated_at: '',
score: 10,
},
member: { id: 'john' },
user: { id: 'john' },
member: { user_id: 'john' },
user: { id: 'john', online: true },
unread_count: 3,
online: true,
};
Expand Down

0 comments on commit 891b01c

Please sign in to comment.