mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
fix: apply fix from eslint
This commit is contained in:
@ -7,8 +7,8 @@ import type {
|
||||
import type { PluginConfig } from '@/types/plugins';
|
||||
|
||||
export interface BaseContext<Config extends PluginConfig> {
|
||||
getConfig(): Promise<Config> | Config;
|
||||
setConfig(conf: Partial<Omit<Config, 'enabled'>>): Promise<void> | void;
|
||||
getConfig: () => Promise<Config> | Config;
|
||||
setConfig: (conf: Partial<Omit<Config, 'enabled'>>) => Promise<void> | void;
|
||||
}
|
||||
|
||||
export interface BackendContext<Config extends PluginConfig>
|
||||
@ -29,6 +29,7 @@ export interface MenuContext<Config extends PluginConfig>
|
||||
refresh: () => Promise<void> | void;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface PreloadContext<Config extends PluginConfig>
|
||||
extends BaseContext<Config> {}
|
||||
|
||||
|
||||
@ -31,6 +31,7 @@ export interface Download {
|
||||
isLeaderTab: boolean;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface Entities {}
|
||||
|
||||
export interface LikeStatus {
|
||||
|
||||
@ -108,6 +108,7 @@ export interface Endpoint {
|
||||
watchEndpoint: WatchEndpoint;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
export interface CommandMetadata {}
|
||||
|
||||
export interface WatchEndpoint {
|
||||
|
||||
@ -13,19 +13,16 @@ type Store = {
|
||||
getState: () => StoreState;
|
||||
replaceReducer: (param1: unknown) => unknown;
|
||||
subscribe: (callback: () => void) => unknown;
|
||||
}
|
||||
};
|
||||
|
||||
export type QueueElement = HTMLElement & {
|
||||
dispatch(obj: {
|
||||
type: string;
|
||||
payload?: unknown;
|
||||
}): void;
|
||||
dispatch(obj: { type: string; payload?: unknown }): void;
|
||||
queue: QueueAPI;
|
||||
};
|
||||
export type QueueAPI = {
|
||||
getItems(): QueueItem[];
|
||||
store: {
|
||||
store: Store,
|
||||
store: Store;
|
||||
};
|
||||
continuation?: string;
|
||||
autoPlaying?: boolean;
|
||||
|
||||
@ -297,10 +297,28 @@ export interface YoutubePlayer {
|
||||
handleGlobalKeyDown: () => void;
|
||||
handleGlobalKeyUp: () => void;
|
||||
wakeUpControls: () => void;
|
||||
cueVideoById: (videoId: string, startSeconds: number, suggestedQuality: string) => void;
|
||||
loadVideoById: (videoId: string, startSeconds: number, suggestedQuality: string) => void;
|
||||
cueVideoByUrl: (mediaContentUrl: string, startSeconds: number, suggestedQuality: string, playerType: string) => void;
|
||||
loadVideoByUrl: (mediaContentUrl: string, startSeconds: number, suggestedQuality: string, playerType: string) => void;
|
||||
cueVideoById: (
|
||||
videoId: string,
|
||||
startSeconds: number,
|
||||
suggestedQuality: string,
|
||||
) => void;
|
||||
loadVideoById: (
|
||||
videoId: string,
|
||||
startSeconds: number,
|
||||
suggestedQuality: string,
|
||||
) => void;
|
||||
cueVideoByUrl: (
|
||||
mediaContentUrl: string,
|
||||
startSeconds: number,
|
||||
suggestedQuality: string,
|
||||
playerType: string,
|
||||
) => void;
|
||||
loadVideoByUrl: (
|
||||
mediaContentUrl: string,
|
||||
startSeconds: number,
|
||||
suggestedQuality: string,
|
||||
playerType: string,
|
||||
) => void;
|
||||
/**
|
||||
* Note: This doesn't resume playback, it plays from the start.
|
||||
*/
|
||||
@ -361,7 +379,7 @@ export interface YoutubePlayer {
|
||||
name: K extends 'videodatachange' ? PlayerAPIEvents[K]['name'] : never,
|
||||
data: K extends 'videodatachange' ? PlayerAPIEvents[K]['value'] : never,
|
||||
) => void,
|
||||
options?: boolean | AddEventListenerOptions | undefined,
|
||||
options?: boolean | AddEventListenerOptions,
|
||||
) => void;
|
||||
removeEventListener: <K extends keyof PlayerAPIEvents>(
|
||||
type: K,
|
||||
@ -370,7 +388,7 @@ export interface YoutubePlayer {
|
||||
name: K extends 'videodatachange' ? PlayerAPIEvents[K]['name'] : never,
|
||||
data: K extends 'videodatachange' ? PlayerAPIEvents[K]['value'] : never,
|
||||
) => void,
|
||||
options?: boolean | EventListenerOptions | undefined,
|
||||
options?: boolean | EventListenerOptions,
|
||||
) => void;
|
||||
getDebugText: () => string;
|
||||
addCueRange: <Parameters extends unknown[], Return>(
|
||||
@ -395,7 +413,11 @@ export interface YoutubePlayer {
|
||||
getMediaReferenceTime: () => number;
|
||||
getSize: () => { width: number; height: number };
|
||||
logImaAdEvent: (eventType: unknown, breakType: unknown) => void;
|
||||
preloadVideoById: (videoId: string, startSeconds: number, suggestedQuality: string) => void;
|
||||
preloadVideoById: (
|
||||
videoId: string,
|
||||
startSeconds: number,
|
||||
suggestedQuality: string,
|
||||
) => void;
|
||||
setAccountLinkState: <Parameters extends unknown[], Return>(
|
||||
...params: Parameters
|
||||
) => Return;
|
||||
|
||||
Reference in New Issue
Block a user