mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 02:51:46 +00:00
45 lines
996 B
TypeScript
45 lines
996 B
TypeScript
import '@total-typescript/ts-reset';
|
|
|
|
import type { ipcRenderer as electronIpcRenderer } from 'electron';
|
|
import type is from 'electron-is';
|
|
|
|
import type config from './config';
|
|
|
|
declare global {
|
|
interface Compressor {
|
|
audioSource: MediaElementAudioSourceNode;
|
|
audioContext: AudioContext;
|
|
}
|
|
|
|
interface DocumentEventMap {
|
|
'audioCanPlay': CustomEvent<Compressor>;
|
|
}
|
|
|
|
interface Window {
|
|
ipcRenderer: typeof electronIpcRenderer;
|
|
mainConfig: typeof config;
|
|
electronIs: typeof is;
|
|
ELECTRON_RENDERER_URL: string | undefined;
|
|
/**
|
|
* YouTube Music internal variable (Last interaction time)
|
|
*/
|
|
_lact: number;
|
|
navigation: Navigation;
|
|
download: () => void;
|
|
togglePictureInPicture: () => void;
|
|
reload: () => void;
|
|
}
|
|
}
|
|
|
|
// import { Howl as _Howl } from 'howler';
|
|
declare module 'howler' {
|
|
interface Howl {
|
|
_sounds: {
|
|
_paused: boolean;
|
|
_ended: boolean;
|
|
_id: string;
|
|
_node: HTMLMediaElement;
|
|
}[];
|
|
}
|
|
}
|