@@ -45,9 +45,6 @@ export class Subscription extends Emitter {
4545 this . options = validateOptions ( opts )
4646 this . key = this . options . key
4747 this . id = counterId ( `Subscription.${ this . options . id || '' } ${ this . key } ` )
48- const { stack } = new Error ( `Subscription ${ this . id } Created` )
49- // stack for debugging
50- this . stack = stack
5148 this . streamId = this . options . streamId
5249 this . streamPartition = this . options . streamPartition
5350
@@ -63,13 +60,12 @@ export class Subscription extends Emitter {
6360 onError : ( err : Error ) => {
6461 this . emit ( 'error' , err )
6562 } ,
66- // @ts -expect-error
6763 } , this . onPipelineEnd )
6864
6965 this . msgStream = this . pipeline . msgStream
7066 }
7167
72- emit ( event , ...args ) {
68+ emit ( event : symbol | string , ...args : any [ ] ) {
7369 if ( event !== 'error' ) {
7470 return super . emit ( event , ...args )
7571 }
@@ -190,6 +186,8 @@ class SubscriptionSession extends Emitter {
190186 subscriptions : Set < Todo >
191187 deletedSubscriptions : Set < Todo >
192188 step ?: Todo
189+ _subscribe
190+ _unsubscribe
193191
194192 constructor ( client : StreamrClient , options : Todo ) {
195193 super ( )
@@ -393,14 +391,7 @@ class SubscriptionSession extends Emitter {
393391 * Keeps track of subscriptions.
394392 */
395393
396- async function defaultOnFinally ( err ) {
397- if ( err ) {
398- throw err
399- }
400- }
401-
402394class Subscriptions {
403-
404395 client : StreamrClient
405396 subSessions : Map < Todo , Todo >
406397
@@ -678,7 +669,6 @@ export class Subscriber {
678669 await resendDone // ensure realtime doesn't start until resend ends
679670 yield * resendSubscribeSub . realtime
680671 } ,
681- // @ts -expect-error
682672 ] , end )
683673
684674 const resendTask = resendMessageStream . subscribe ( )
0 commit comments