@@ -80,13 +80,14 @@ describe('injectRuntimeBridge', () => {
8080
8181describe ( 'wireRuntimeBridgeChannels' , ( ) => {
8282 function makeEnv ( ) {
83- const handlers : Record < string , Function > = { }
84- const removed : Array < { event : string ; cb : Function } > = [ ]
83+ type Handler = ( data : any ) => void
84+ const handlers : Record < string , Handler > = { }
85+ const removed : Array < { event : string ; cb : Handler } > = [ ]
8586 const sent : Array < { event : string ; data : any } > = [ ]
8687 return {
8788 hot : {
88- on : ( event : string , cb : Function ) => ( handlers [ event ] = cb ) ,
89- off : ( event : string , cb : Function ) => removed . push ( { event, cb } ) ,
89+ on : ( event : string , cb : Handler ) => ( handlers [ event ] = cb ) ,
90+ off : ( event : string , cb : Handler ) => removed . push ( { event, cb } ) ,
9091 send : ( event : string , data : any ) => sent . push ( { event, data } ) ,
9192 } ,
9293 __handlers : handlers ,
@@ -163,7 +164,7 @@ describe('wireRuntimeBridgeChannels', () => {
163164 } )
164165
165166 // Dispatching a worker event after teardown must not reach the target.
166- const received : any [ ] = [ ]
167+ const received : Array < any > = [ ]
167168 target . addEventListener ( 'tanstack-dispatch-event' , ( e ) =>
168169 received . push ( ( e as CustomEvent ) . detail ) ,
169170 )
0 commit comments