@@ -162,7 +162,7 @@ describeRepeats('resends', () => {
162162 await client . publish ( emptyStream . id , msg )
163163
164164 const received = [ ]
165- let t
165+ let t ! : ReturnType < typeof setTimeout >
166166 for await ( const m of sub ) {
167167 received . push ( m . getParsedContent ( ) )
168168 clearTimeout ( t )
@@ -296,12 +296,12 @@ describeRepeats('resends', () => {
296296 const req = await client . publish ( stream . id , newMessage ) // should be realtime
297297 published . push ( newMessage )
298298 publishedRequests . push ( req )
299- let t : ReturnType < typeof setTimeout >
299+ let t ! : ReturnType < typeof setTimeout >
300300 for await ( const msg of sub ) {
301301 receivedMsgs . push ( msg . getParsedContent ( ) )
302302 if ( receivedMsgs . length === published . length ) {
303303 await sub . return ( )
304- clearTimeout ( t ! )
304+ clearTimeout ( t )
305305 t = setTimeout ( ( ) => {
306306 // await wait() // give resent event a chance to fire
307307 onResent . reject ( new Error ( 'resent never called' ) )
@@ -310,7 +310,7 @@ describeRepeats('resends', () => {
310310 }
311311
312312 await onResent
313- clearTimeout ( t ! )
313+ clearTimeout ( t )
314314
315315 expect ( receivedMsgs ) . toHaveLength ( published . length )
316316 expect ( receivedMsgs ) . toEqual ( published )
@@ -448,8 +448,8 @@ describeRepeats('resends', () => {
448448 published . push ( message )
449449 publishedRequests . push ( req )
450450
451- let t
452- let receivedMsgs
451+ let t ! : ReturnType < typeof setTimeout >
452+ let receivedMsgs : any [ ]
453453 try {
454454 receivedMsgs = await collect ( sub , async ( { received } ) => {
455455 if ( received . length === published . length ) {
0 commit comments