mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 05:11:20 -08:00
refactor(core): [CORE-21] generate compatible public and editor declarations
This commit is contained in:
1 parent
ee895a558f
commit
faaa3e8c2d
123 files changed
+31305
-1712
No files matched your search
@@ -24,7 +24,7 @@ export interface UIEvents {
|
||||
'setting': [boolean]
|
||||
'aspectRatio': [string]
|
||||
'flip': [string]
|
||||
'blur': []
|
||||
'blur': [Event]
|
||||
'resize': []
|
||||
}
|
||||
|
||||
|
||||
@@ -1,29 +1,8 @@
|
||||
import type { UIEvents } from '../control/types'
|
||||
import type { Events } from '../../types/runtime/events'
|
||||
|
||||
// The emitter stays open to extension names. Known native events retain their
|
||||
// payloads so subsystem subscriptions are checked against the assembled player.
|
||||
export interface CoreEvents extends UIEvents, Record<PropertyKey, unknown[]> {
|
||||
[name: `video:${string}`]: [event: Event]
|
||||
'ready': []
|
||||
'error': [error: unknown, attempt: number]
|
||||
'fullscreenError': [error: unknown]
|
||||
'destroy': []
|
||||
'restart': [string]
|
||||
'focus': [Event]
|
||||
'lock': [boolean]
|
||||
'view': [boolean]
|
||||
'subtitleOffset': [number]
|
||||
'seek': [time: number, requestedTime: number | string]
|
||||
'document:click': [Event]
|
||||
'document:contextmenu': [Event]
|
||||
'document:keydown': [KeyboardEvent]
|
||||
'document:touchmove': [Event]
|
||||
'document:touchend': [Event]
|
||||
'document:touchcancel': [Event]
|
||||
'window:resize': [Event]
|
||||
'window:orientationchange': [Event]
|
||||
'window:scroll': [Event]
|
||||
}
|
||||
export interface CoreEvents extends Events {}
|
||||
|
||||
export interface CoreEmission<Names extends keyof CoreEvents = keyof CoreEvents> {
|
||||
emit: <Name extends Names>(name: Name, ...args: [...CoreEvents[Name]]) => unknown
|
||||
|
||||
@@ -34,7 +34,7 @@ export interface SettingItem extends TreeItem {
|
||||
}
|
||||
|
||||
export interface SettingEvents {
|
||||
'blur': []
|
||||
'blur': [Event]
|
||||
'focus': [event: Event]
|
||||
'resize': []
|
||||
'video:ratechange': [Event]
|
||||
|
||||
Reference in new issue
Block a user