mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 02:01:20 -08:00
refactor(core): CORE-18 type builtins and own prompt lifetimes
This commit is contained in:
1 parent
a842058136
commit
98a1800032
55 files changed
+26511
-650
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import type { AutoPlaybackHost } from '../../packages/artplayer/src/plugins/autoPlayback'
|
||||
import autoPlayback from '../../packages/artplayer/src/plugins/autoPlayback'
|
||||
|
||||
declare const host: AutoPlaybackHost
|
||||
const plugin = autoPlayback(host)
|
||||
const times: Record<string, number> = plugin.times
|
||||
const remaining: Record<string, number> = plugin.delete('example')
|
||||
const cleared: void = plugin.clear()
|
||||
// @ts-expect-error Record deletion takes the persisted string key.
|
||||
plugin.delete({ id: 'example' })
|
||||
// @ts-expect-error Playback times contain numbers, not text.
|
||||
const invalid: Record<string, string> = plugin.times
|
||||
// @ts-expect-error The plugin needs both recording and prompt resources.
|
||||
autoPlayback({ storage: host.storage })
|
||||
export { cleared, invalid, remaining, times }
|
||||
Reference in new issue
Block a user