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

+22
View File
@@ -0,0 +1,22 @@
import type Notice from '../../packages/artplayer/src/notice'
import type Artplayer from '../../packages/artplayer/types/artplayer'
declare const notice: Notice
declare const art: Artplayer
const visible: boolean = notice.show
notice.show = 'message'
notice.show = new Error('message')
notice.show = false
notice.show = ''
const timer: number | null = notice.timer
const destroyed: void = notice.destroy()
// @ts-expect-error The runtime getter returns visibility, not message text.
const text: string = notice.show
// @ts-expect-error True is not a declared message input.
notice.show = true
// @ts-expect-error Arbitrary objects are not declared message inputs.
notice.show = {}
// Preserve old legal consumers until CORE-21 coordinates an explicit precise view.
const legacy: string | Error | false = art.notice.show
art.notice.show = false
export { destroyed, legacy, text, timer, visible }