Skip to content

Commit ed9ef4a

Browse files
committed
Fix type errors on bug fix in Testimonial and Carousel components related to pause() and resume()
1 parent 3090035 commit ed9ef4a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/components/Carousel/client/index.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const AUTOPLAY_OPTIONS = {
2828
}
2929

3030
type DebugEmblaElement = HTMLElement & { __emblaApi__?: EmblaCarouselType }
31+
type TimerHandle = ReturnType<typeof setTimeout> | number
3132

3233
export class CarouselElement extends HTMLElement {
3334
private emblaApi: EmblaCarouselType | null = null
@@ -43,7 +44,7 @@ export class CarouselElement extends HTMLElement {
4344
private hasAutoplaySupport = false
4445
private autoplayReady = false
4546
private autoplayReadyScheduled = false
46-
private autoplayReadyTimer: ReturnType<typeof setTimeout> | null = null
47+
private autoplayReadyTimer: TimerHandle | null = null
4748
private readonly animationInstanceId: string
4849
private readonly domReadyHandler = () => {
4950
document.removeEventListener('DOMContentLoaded', this.domReadyHandler)

‎src/components/Testimonials/client/index.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const AUTOPLAY_OPTIONS = {
2828
}
2929

3030
type DebugEmblaElement = HTMLElement & { __emblaApi__?: EmblaCarouselType }
31+
type TimerHandle = ReturnType<typeof setTimeout> | number
3132

3233
export class TestimonialsCarouselElement extends HTMLElement {
3334
private emblaApi: EmblaCarouselType | null = null
@@ -43,7 +44,7 @@ export class TestimonialsCarouselElement extends HTMLElement {
4344
private hasAutoplaySupport = false
4445
private autoplayReady = false
4546
private autoplayReadyScheduled = false
46-
private autoplayReadyTimer: ReturnType<typeof setTimeout> | null = null
47+
private autoplayReadyTimer: TimerHandle | null = null
4748
private readonly animationInstanceId: string
4849
private readonly domReadyHandler = () => {
4950
document.removeEventListener('DOMContentLoaded', this.domReadyHandler)

0 commit comments

Comments
 (0)