mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
refactor(core): [CORE-20] type entry and converge initialization
This commit is contained in:
1 parent
ccf77c4ed2
commit
ee895a558f
100 files changed
+33854
-839
No files matched your search
@@ -2,6 +2,11 @@ import type { SubscriptionHost } from './component/resources'
|
||||
import { getScope, isClosing } from './lifecycle/instance'
|
||||
import { addClass, removeClass } from './utils'
|
||||
|
||||
export interface NoticeSink {
|
||||
get show(): unknown
|
||||
set show(value: unknown)
|
||||
}
|
||||
|
||||
interface NoticeHost extends SubscriptionHost<{ destroy: [] }> {
|
||||
constructor: { NOTICE_TIME: number }
|
||||
template: { $player: HTMLElement, $noticeInner: HTMLElement }
|
||||
@@ -24,7 +29,7 @@ function cancelNotice(notice: Notice): void {
|
||||
}
|
||||
}
|
||||
|
||||
export default class Notice {
|
||||
export default class Notice implements NoticeSink {
|
||||
declare art: NoticeHost
|
||||
declare timer: ReturnType<typeof setTimeout> | null
|
||||
|
||||
|
||||
Reference in new issue
Block a user