From f73188ab83a4eadf5b6d11220af43a751d969931 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Thu, 10 Jul 2025 14:17:39 +0900 Subject: [PATCH] fix: apply fix to types from eslint --- src/config/defaults.ts | 6 +++--- src/i18n/resources/@types/index.ts | 4 ++-- src/plugins/picture-in-picture/index.ts | 14 +++++++------- src/reset.d.ts | 2 +- src/yt-web-components.d.ts | 12 ++++++------ 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/config/defaults.ts b/src/config/defaults.ts index dcd56128..fb694c9e 100644 --- a/src/config/defaults.ts +++ b/src/config/defaults.ts @@ -12,8 +12,8 @@ export interface DefaultConfig { 'window-size': WindowSizeConfig; 'window-maximized': boolean; 'window-position': WindowPositionConfig; - url: string; - options: { + 'url': string; + 'options': { language?: string; tray: boolean; appVisible: boolean; @@ -35,7 +35,7 @@ export interface DefaultConfig { usePodcastParticipantAsArtist: boolean; themes: string[]; }; - plugins: Record; + 'plugins': Record; } const defaultConfig: DefaultConfig = { diff --git a/src/i18n/resources/@types/index.ts b/src/i18n/resources/@types/index.ts index ee6a4d7c..1de8ae32 100644 --- a/src/i18n/resources/@types/index.ts +++ b/src/i18n/resources/@types/index.ts @@ -2,9 +2,9 @@ export interface LanguageResources { [lang: string]: { translation: Record & { language?: { - name: string; + 'name': string; 'local-name': string; - code: string; + 'code': string; }; }; }; diff --git a/src/plugins/picture-in-picture/index.ts b/src/plugins/picture-in-picture/index.ts index 30414f9d..b0bcc275 100644 --- a/src/plugins/picture-in-picture/index.ts +++ b/src/plugins/picture-in-picture/index.ts @@ -7,15 +7,15 @@ import { onPlayerApiReady } from './renderer'; import { t } from '@/i18n'; export type PictureInPicturePluginConfig = { - enabled: boolean; - alwaysOnTop: boolean; - savePosition: boolean; - saveSize: boolean; - hotkey: 'P'; + 'enabled': boolean; + 'alwaysOnTop': boolean; + 'savePosition': boolean; + 'saveSize': boolean; + 'hotkey': 'P'; 'pip-position': [number, number]; 'pip-size': [number, number]; - isInPiP: boolean; - useNativePiP: boolean; + 'isInPiP': boolean; + 'useNativePiP': boolean; }; export default createPlugin({ diff --git a/src/reset.d.ts b/src/reset.d.ts index bc45bec1..bb204966 100644 --- a/src/reset.d.ts +++ b/src/reset.d.ts @@ -16,7 +16,7 @@ declare global { interface DocumentEventMap { 'ytmd:audio-can-play': CustomEvent; - videodatachange: CustomEvent; + 'videodatachange': CustomEvent; } interface Window { diff --git a/src/yt-web-components.d.ts b/src/yt-web-components.d.ts index 8370ab00..3c190f7f 100644 --- a/src/yt-web-components.d.ts +++ b/src/yt-web-components.d.ts @@ -39,7 +39,7 @@ declare module 'solid-js' { } interface IntrinsicElements { - center: ComponentProps<'div'>; + 'center': ComponentProps<'div'>; 'ytmd-trans': ComponentProps<'span'> & YtmdTransProps; 'yt-formatted-string': ComponentProps<'span'> & YtFormattedStringProps; 'yt-button-renderer': ComponentProps<'button'> & YtButtonRendererProps; @@ -53,11 +53,11 @@ declare module 'solid-js' { 'yt-icon': ComponentProps<'div'>; // input type="range" slider component 'tp-yt-paper-slider': ComponentProps<'input'> & { - value?: number | string; - min?: number | string; - max?: number | string; - step?: number | string; - disabled?: boolean; + 'value'?: number | string; + 'min'?: number | string; + 'max'?: number | string; + 'step'?: number | string; + 'disabled'?: boolean; 'on:immediate-value-changed'?: ( event: CustomEvent<{ value: number }>, ) => void;