Skip to content

Commit f13a507

Browse files
committed
Update use-echo.ts
1 parent 816f69b commit f13a507

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/react/src/hooks/use-echo.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,18 @@ export const useEchoPublic = <
204204
);
205205
};
206206

207-
export const useEchoModel = <TPayload, TModel extends string>(
207+
export const useEchoModel = <
208+
TPayload,
209+
TModel extends string,
210+
TDriver extends BroadcastDriver = BroadcastDriver,
211+
>(
208212
model: TModel,
209213
identifier: string | number,
210214
event: ModelEvents<TModel> | ModelEvents<TModel>[],
211215
callback: (payload: ModelPayload<TPayload>) => void,
212216
dependencies: any[] = [],
213217
) => {
214-
return useEcho<ModelPayload<TPayload>>(
218+
return useEcho<ModelPayload<TPayload>, TDriver, "private">(
215219
`${model}.${identifier}`,
216220
toArray(event).map((e) => (e.startsWith(".") ? e : `.${e}`)),
217221
callback,

0 commit comments

Comments
 (0)