@@ -182,7 +182,7 @@ function handleForwardedWorkerRejection(workerError: SerializedWorkerError): voi
182182 */
183183interface MinimalDedicatedWorkerGlobalScope {
184184 postMessage : ( message : unknown ) => void ;
185- addEventListener : ( type : string , listener : ( event : any ) => void ) => void ;
185+ addEventListener : ( type : string , listener : ( event : unknown ) => void ) => void ;
186186 location ?: { href ?: string } ;
187187}
188188
@@ -224,7 +224,7 @@ export function registerWebWorker({ self }: RegisterWebWorkerOptions): void {
224224 // Set up unhandledrejection handler inside the worker
225225 // Following the same pattern as globalHandlers
226226 // unhandled rejections don't bubble to the parent thread, so we need to handle them here
227- self . addEventListener ( 'unhandledrejection' , ( event : any ) => {
227+ self . addEventListener ( 'unhandledrejection' , ( event : unknown ) => {
228228 const reason = _getUnhandledRejectionError ( event ) ;
229229
230230 // Forward the raw reason to parent thread
@@ -240,10 +240,10 @@ export function registerWebWorker({ self }: RegisterWebWorkerOptions): void {
240240 _sentryWorkerError : serializedError ,
241241 } ) ;
242242
243- DEBUG_BUILD && console . log ( '[Sentry Worker] Forwarding unhandled rejection to parent' , serializedError ) ;
243+ DEBUG_BUILD && debug . log ( '[Sentry Worker] Forwarding unhandled rejection to parent' , serializedError ) ;
244244 } ) ;
245245
246- DEBUG_BUILD && console . log ( '[Sentry Worker] Registered worker with unhandled rejection handling' ) ;
246+ DEBUG_BUILD && debug . log ( '[Sentry Worker] Registered worker with unhandled rejection handling' ) ;
247247}
248248
249249function isSentryMessage ( eventData : unknown ) : eventData is WebWorkerMessage {
0 commit comments