@@ -46,6 +46,7 @@ const VideoPlayer = {
46
46
* @returns {HTMLIFrameElement }
47
47
*/
48
48
iframe : ( ) => {
49
+ // @ts -expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLIFrameElement'.
49
50
return document . querySelector ( '#player' )
50
51
} ,
51
52
@@ -54,6 +55,7 @@ const VideoPlayer = {
54
55
* @returns {HTMLElement }
55
56
*/
56
57
playerContainer : ( ) => {
58
+ // @ts -expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
57
59
return document . querySelector ( '.player-container' )
58
60
} ,
59
61
@@ -107,6 +109,7 @@ const VideoPlayer = {
107
109
showVideoError : ( errorMessage ) => {
108
110
VideoPlayer . playerContainer ( ) . innerHTML = '<div class="player-error"><b>ERROR:</b> <span class="player-error-message"></span></div>'
109
111
112
+ // @ts -expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
110
113
document . querySelector ( '.player-error-message' ) . textContent = errorMessage
111
114
} ,
112
115
@@ -403,13 +406,15 @@ const Setting = {
403
406
* @returns {HTMLInputElement }
404
407
*/
405
408
settingsIcon : ( ) => {
409
+ // @ts -expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
406
410
return document . querySelector ( '[aria-label="Open Settings"]' )
407
411
} ,
408
412
/**
409
413
* Returns the checkbox
410
414
* @returns {HTMLInputElement }
411
415
*/
412
416
checkbox : ( ) => {
417
+ // @ts -expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
413
418
return document . querySelector ( '#setting' )
414
419
} ,
415
420
@@ -418,6 +423,7 @@ const Setting = {
418
423
* @returns {HTMLElement }
419
424
*/
420
425
container : ( ) => {
426
+ // @ts -expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
421
427
return document . querySelector ( '.setting-container' )
422
428
} ,
423
429
@@ -496,6 +502,7 @@ const Setting = {
496
502
* settings container is animating/sliding in behind it.
497
503
*/
498
504
higlightSettingsButton : ( ) => {
505
+ // @ts -expect-error - Object is possibly 'null'.
499
506
const openSettingsClasses = document . querySelector ( '.open-settings' ) . classList
500
507
501
508
openSettingsClasses . add ( 'active' )
@@ -530,6 +537,7 @@ const PlayOnYouTube = {
530
537
* @returns {HTMLElement }
531
538
*/
532
539
button : ( ) => {
540
+ // @ts -expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
533
541
return document . querySelector ( '.play-on-youtube' )
534
542
} ,
535
543
@@ -573,6 +581,7 @@ const Tooltip = {
573
581
* @returns {HTMLElement }
574
582
*/
575
583
icon : ( ) => {
584
+ // @ts -expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
576
585
return document . querySelector ( '.info-icon' )
577
586
} ,
578
587
@@ -581,6 +590,7 @@ const Tooltip = {
581
590
* @returns {HTMLElement }
582
591
*/
583
592
tooltip : ( ) => {
593
+ // @ts -expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
584
594
return document . querySelector ( '.info-icon-tooltip' )
585
595
} ,
586
596
@@ -684,6 +694,7 @@ const MouseMove = {
684
694
MouseMove . fadeInContent ( )
685
695
}
686
696
697
+ // @ts -expect-error - Type 'Timeout' is not assignable to type 'null'.
687
698
MouseMove . timer = setTimeout ( ( ) => {
688
699
// Only fade out if user is not hovering content or tooltip is shown
689
700
if ( ! MouseMove . isHoveringContent && ! Tooltip . visible ) {
@@ -697,6 +708,7 @@ const MouseMove = {
697
708
* @returns {HTMLElement }
698
709
*/
699
710
bg : ( ) => {
711
+ // @ts -expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
700
712
return document . querySelector ( '.bg' )
701
713
} ,
702
714
@@ -706,6 +718,7 @@ const MouseMove = {
706
718
* @returns {HTMLElement }
707
719
*/
708
720
contentHover : ( ) => {
721
+ // @ts -expect-error - Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
709
722
return document . querySelector ( '.content-hover' )
710
723
} ,
711
724
0 commit comments