mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-13 15:56:15 -08:00
refactor(dash): [PKG-DASH-04] migrate strict TypeScript and compatible declarations
This commit is contained in:
1 parent
7de04573b6
commit
6840544e0e
38 files changed
+1744
-102
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import type PublicFactory from 'artplayer-plugin-dash-control'
|
||||
import factory from '../../packages/artplayer-plugin-dash-control/src/index'
|
||||
|
||||
const compatible: typeof PublicFactory = factory
|
||||
const implementation: typeof factory = compatible
|
||||
implementation({ quality: { getName: level => `${level.height}p` }, audio: { getName: track => track.lang || String(track.id) } })
|
||||
compatible()
|
||||
// @ts-expect-error Source and public declaration reject invalid formatter results.
|
||||
factory({ quality: { getName: () => 1 } })
|
||||
Reference in new issue
Block a user