From b6254f41bc004f34684f5c9f1339d2755f56b558 Mon Sep 17 00:00:00 2001 From: Harvey Zack Date: Sat, 4 Jun 2022 11:49:01 +0800 Subject: [PATCH] Update artplayer.d.ts --- packages/artplayer/types/artplayer.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/artplayer/types/artplayer.d.ts b/packages/artplayer/types/artplayer.d.ts index 093a024c0..4859c3714 100644 --- a/packages/artplayer/types/artplayer.d.ts +++ b/packages/artplayer/types/artplayer.d.ts @@ -172,9 +172,9 @@ type Component = { add(option: ComponentOption): HTMLElement; }; -type PluginFunction = (art: Artplayer) => any; -type WhitelistFunction = (ua: string) => Boolean; +type PluginFunction = (art: Artplayer) => any | ((option: any) => (art: Artplayer) => any); type CustomType = (video: HTMLVideoElement, url: string, art: Artplayer) => any; +type WhitelistFunction = (ua: string) => Boolean; type EventCallback = (event: Event) => any; type SubtitleOption = { @@ -375,7 +375,7 @@ type Option = { /** * Custom plugin list */ - plugins?: PluginFunction[] | (() => any); + plugins?: PluginFunction[]; /** * Custom mobile whitelist