From cf5057fa8947c8a0e49ae54936ffc9290f74e020 Mon Sep 17 00:00:00 2001 From: Harvey Zack Date: Sat, 23 Aug 2025 12:12:46 +0800 Subject: [PATCH] feat: allow custom properties in Setting and Selector interfaces --- docs/assets/ts/artplayer.d.ts | 10 +++++++++- packages/artplayer/types/setting.d.ts | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/assets/ts/artplayer.d.ts b/docs/assets/ts/artplayer.d.ts index 8894db103..516878efe 100644 --- a/docs/assets/ts/artplayer.d.ts +++ b/docs/assets/ts/artplayer.d.ts @@ -216,7 +216,10 @@ export interface Setting { */ onClick?: (this: Artplayer, item: SettingOption, element: HTMLDivElement, event: Event) => void - [key: string]: unknown + /** + * Allow custom properties + */ + [key: string]: any } export interface Quality { @@ -994,6 +997,11 @@ export interface Selector { * Html string of selector */ html: string | HTMLElement + + /** + * Allow custom properties + */ + [key: string]: any } export interface Component { diff --git a/packages/artplayer/types/setting.d.ts b/packages/artplayer/types/setting.d.ts index 0ee4054a0..d605a604f 100644 --- a/packages/artplayer/types/setting.d.ts +++ b/packages/artplayer/types/setting.d.ts @@ -90,5 +90,8 @@ export interface Setting { */ onClick?: (this: Artplayer, item: SettingOption, element: HTMLDivElement, event: Event) => void - [key: string]: unknown + /** + * Allow custom properties + */ + [key: string]: any }