From 1b79d2e4295a68cc9b5c1843ac58c75626bc6964 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Thu, 30 Nov 2023 03:03:04 +0900 Subject: [PATCH] fix(song-info-front): add type --- src/providers/song-info-front.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/providers/song-info-front.ts b/src/providers/song-info-front.ts index 90891e58..b203a556 100644 --- a/src/providers/song-info-front.ts +++ b/src/providers/song-info-front.ts @@ -5,6 +5,7 @@ import type { GetState } from '@/types/datahost-get-state'; import type { VideoDataChangeValue } from '@/types/player-api-events'; import type { SongInfo } from './song-info'; +import type { VideoDataChanged } from '@/types/video-data-changed'; let songInfo: SongInfo = {} as SongInfo; export const getSongInfo = () => songInfo; @@ -107,7 +108,7 @@ export default (api: YoutubePlayer) => { const waitingEvent = new Set(); // Name = "dataloaded" and abit later "dataupdated" api.addEventListener('videodatachange', (name: string, videoData) => { - document.dispatchEvent(new CustomEvent('videodatachange', { detail: { name, videoData } })); + document.dispatchEvent(new CustomEvent('videodatachange', { detail: { name, videoData } })); if (name === 'dataupdated' && waitingEvent.has(videoData.videoId)) { waitingEvent.delete(videoData.videoId);