Skip to content

Commit 238f9d0

Browse files
committed
Improve typing
1 parent e754581 commit 238f9d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/web/bridge.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ export const emit = <T>(message: Message<T>) => {
1212
(window as any).ReactNativeWebView.postMessage(JSON.stringify(message));
1313
};
1414

15-
export const buildUseSubscribe = (useEffect: any) => {
15+
export const buildUseSubscribe = (
16+
useEffect: (cb: () => void, deps: any[]) => void
17+
) => {
1618
return <T>(onSubscribe: (message: Message<T>) => void) => {
1719
useEffect(() => {
1820
const listener = (e: any) => {

0 commit comments

Comments
 (0)