@@ -280,8 +280,8 @@ export default class CustomElementInternals {
280
280
if ( definition ) {
281
281
this . _upgradeAnElement ( element , definition ) ;
282
282
}
283
- } catch ( e : any ) {
284
- this . reportTheException ( e ) ;
283
+ } catch ( e : unknown ) {
284
+ this . reportTheException ( e as Error ) ;
285
285
}
286
286
}
287
287
@@ -340,8 +340,8 @@ export default class CustomElementInternals {
340
340
if ( definition . connectedCallback ) {
341
341
try {
342
342
definition . connectedCallback . call ( element ) ;
343
- } catch ( e : any ) {
344
- this . reportTheException ( e ) ;
343
+ } catch ( e : unknown ) {
344
+ this . reportTheException ( e as Error ) ;
345
345
}
346
346
}
347
347
}
@@ -351,8 +351,8 @@ export default class CustomElementInternals {
351
351
if ( definition . disconnectedCallback ) {
352
352
try {
353
353
definition . disconnectedCallback . call ( element ) ;
354
- } catch ( e : any ) {
355
- this . reportTheException ( e ) ;
354
+ } catch ( e : unknown ) {
355
+ this . reportTheException ( e as Error ) ;
356
356
}
357
357
}
358
358
}
@@ -377,8 +377,8 @@ export default class CustomElementInternals {
377
377
newValue ,
378
378
namespace
379
379
) ;
380
- } catch ( e : any ) {
381
- this . reportTheException ( e ) ;
380
+ } catch ( e : unknown ) {
381
+ this . reportTheException ( e as Error ) ;
382
382
}
383
383
}
384
384
}
@@ -413,7 +413,7 @@ export default class CustomElementInternals {
413
413
return ;
414
414
}
415
415
416
- return ( registry as any as CustomElementRegistry ) . internal_localNameToDefinition (
416
+ return ( ( registry as unknown ) as CustomElementRegistry ) . internal_localNameToDefinition (
417
417
localName
418
418
) ;
419
419
}
@@ -436,7 +436,7 @@ export default class CustomElementInternals {
436
436
// Only create custom elements if the document is associated with a
437
437
// registry.
438
438
if ( registry && ( namespace === null || namespace === NS_HTML ) ) {
439
- const definition = ( registry as any as CustomElementRegistry ) . internal_localNameToDefinition (
439
+ const definition = ( ( registry as unknown ) as CustomElementRegistry ) . internal_localNameToDefinition (
440
440
localName
441
441
) ;
442
442
if ( definition ) {
@@ -507,8 +507,8 @@ export default class CustomElementInternals {
507
507
}
508
508
509
509
return result ;
510
- } catch ( e : any ) {
511
- this . reportTheException ( e ) ;
510
+ } catch ( e : unknown ) {
511
+ this . reportTheException ( e as Error ) ;
512
512
513
513
// When construction fails, a new HTMLUnknownElement is produced.
514
514
// However, there's no direct way to create one, so we create a
0 commit comments