@@ -3,40 +3,29 @@ import { useCallback } from 'react';
33import type { Channel , EventTypes , StreamChat } from 'stream-chat' ;
44import { useSyncExternalStore } from 'use-sync-external-store/shim' ;
55
6- import { DefaultStreamChatGenerics } from '../types/types' ;
7-
86const noop = ( ) => { } ;
97
10- export function useSyncClientEventsToChannel <
11- StreamChatGenerics extends DefaultStreamChatGenerics ,
12- O ,
13- > ( _ : {
14- channel : Channel < StreamChatGenerics > ;
15- client : StreamChat < StreamChatGenerics > ;
16- selector : ( channel : Channel < StreamChatGenerics > , client : StreamChat < StreamChatGenerics > ) => O ;
8+ export function useSyncClientEventsToChannel < O > ( _ : {
9+ channel : Channel ;
10+ client : StreamChat ;
11+ selector : ( channel : Channel , client : StreamChat ) => O ;
1712 stateChangeEventKeys ?: EventTypes [ ] ;
1813} ) : O ;
19- export function useSyncClientEventsToChannel <
20- StreamChatGenerics extends DefaultStreamChatGenerics ,
21- O ,
22- > ( _ : {
23- selector : ( channel : Channel < StreamChatGenerics > , client : StreamChat < StreamChatGenerics > ) => O ;
24- channel ?: Channel < StreamChatGenerics > | undefined ;
25- client ?: StreamChat < StreamChatGenerics > | undefined ;
14+ export function useSyncClientEventsToChannel < O > ( _ : {
15+ selector : ( channel : Channel , client : StreamChat ) => O ;
16+ channel ?: Channel | undefined ;
17+ client ?: StreamChat | undefined ;
2618 stateChangeEventKeys ?: EventTypes [ ] ;
2719} ) : O | undefined ;
28- export function useSyncClientEventsToChannel <
29- StreamChatGenerics extends DefaultStreamChatGenerics ,
30- O ,
31- > ( {
20+ export function useSyncClientEventsToChannel < O > ( {
3221 channel,
3322 client,
3423 selector,
3524 stateChangeEventKeys = [ 'all' ] ,
3625} : {
37- selector : ( channel : Channel < StreamChatGenerics > , client : StreamChat < StreamChatGenerics > ) => O ;
38- channel ?: Channel < StreamChatGenerics > | undefined ;
39- client ?: StreamChat < StreamChatGenerics > ;
26+ selector : ( channel : Channel , client : StreamChat ) => O ;
27+ channel ?: Channel | undefined ;
28+ client ?: StreamChat ;
4029 stateChangeEventKeys ?: EventTypes [ ] ;
4130} ) : O | undefined {
4231 const subscribe = useCallback (
0 commit comments