@@ -121,7 +121,7 @@ export class TSR {
121121 if ( ! existingDevice || ! isEqual ( existingDevice . options , newDeviceOptions ) ) {
122122 if ( existingDevice ) {
123123 existingDevice . abortController . abort ( )
124- await this . conductor . removeDevice ( unprotectString ( deviceId ) )
124+ await ( this . conductor as any ) . removeDevice ( unprotectString ( deviceId ) )
125125 }
126126 await this . _removeSideloadDevice ( deviceId )
127127
@@ -139,7 +139,7 @@ export class TSR {
139139 this . sideLoadDevice ( deviceId , newDeviceOptions )
140140
141141 // Create the device, but don't initialize it:
142- const devicePr = this . conductor . createDevice ( unprotectString ( deviceId ) , newDeviceOptions , {
142+ const devicePr = ( this . conductor as any ) . createDevice ( unprotectString ( deviceId ) , newDeviceOptions , {
143143 signal : abortController . signal ,
144144 } )
145145
@@ -151,7 +151,7 @@ export class TSR {
151151
152152 const device = await devicePr
153153
154- await device . device . on ( 'connectionChanged' , ( ...args ) => {
154+ device . device . on ( 'connectionChanged' , ( ...args : unknown [ ] ) => {
155155 // TODO: figure out why the arguments to this event callback lost the correct typings
156156 const status = args [ 0 ] as DeviceStatus
157157 this . onDeviceStatus ( deviceId , status )
@@ -178,13 +178,13 @@ export class TSR {
178178 )
179179 }
180180
181- await device . device . on ( 'debug' , ( ...args : any [ ] ) => {
181+ device . device . on ( 'debug' , ( ...args : any [ ] ) => {
182182 const data = args . map ( ( arg ) => ( typeof arg === 'object' ? JSON . stringify ( arg ) : arg ) )
183183 this . log . debug ( `Device "${ device . deviceName || deviceId } " (${ device . instanceId } )` , { data } )
184184 } )
185185
186186 // now initialize it
187- await this . conductor . initDevice ( unprotectString ( deviceId ) , newDeviceOptions , undefined , {
187+ await ( this . conductor as any ) . initDevice ( unprotectString ( deviceId ) , newDeviceOptions , undefined , {
188188 signal : abortController . signal ,
189189 } )
190190
0 commit comments