From 57f5c44d17f97b8abef7a142dd3f04accb798a7b Mon Sep 17 00:00:00 2001 From: Harvey Date: Sun, 9 Oct 2022 17:14:43 +0800 Subject: [PATCH] Update option.d.ts --- packages/artplayer/types/option.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/artplayer/types/option.d.ts b/packages/artplayer/types/option.d.ts index bfd2acf4c..cab255281 100644 --- a/packages/artplayer/types/option.d.ts +++ b/packages/artplayer/types/option.d.ts @@ -5,6 +5,8 @@ import { I18n } from './i18n'; import { ComponentOption } from './component'; import Artplayer = require('./artplayer'); +type CustomType = 'flv' | 'm3u8' | 'hls' | 'ts' | 'mpd' | 'torrent' | (string & Record); + export type Option = { /** * The player id @@ -34,7 +36,7 @@ export type Option = { /** * Video url type */ - type?: string; + type?: CustomType; /** * Player color theme @@ -296,7 +298,9 @@ export type Option = { /** * Custom video type function */ - customType?: Record any>; + customType?: Partial< + Record any> + >; }; export default Option;