feat: migration to TypeScript part 2

Co-authored-by: Su-Yong <simssy2205@gmail.com>
This commit is contained in:
JellyBrick
2023-09-03 06:37:47 +09:00
parent 82bcadcd64
commit d30755e5fa
40 changed files with 523 additions and 296 deletions

19
reset.d.ts vendored
View File

@ -2,8 +2,14 @@ import '@total-typescript/ts-reset';
import { YoutubePlayer } from './types/youtube-player';
declare global {
interface Compressor {
audioSource: MediaElementAudioSourceNode;
audioContext: AudioContext;
}
interface DocumentEventMap {
'apiLoaded': CustomEvent<YoutubePlayer>;
'audioCanPlay': CustomEvent<Compressor>;
}
interface Window {
@ -11,5 +17,18 @@ declare global {
* YouTube Music internal variable (Last interaction time)
*/
_lact: number;
navigation: Navigation;
}
}
// import { Howl as _Howl } from 'howler';
declare module 'howler' {
interface Howl {
_sounds: {
_paused: boolean;
_ended: boolean;
_id: string;
_node: HTMLMediaElement;
}[];
}
}