refactor(core): CORE-18 type builtins and own prompt lifetimes

This commit is contained in:
Harvey Zhao committed 2026-09-11 12:31:01 +08:00
1 parent a842058136
commit 98a1800032
55 files changed
+26511 -650

No files matched your search

+15
View File
@@ -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 }