refactor(core): [CORE-20] type entry and converge initialization

This commit is contained in:
Harvey Zhao committed 2026-09-11 16:07:06 +08:00
1 parent ccf77c4ed2
commit ee895a558f
100 files changed
+33854 -839

No files matched your search

+13
View File
@@ -1,3 +1,16 @@
import type { MediaSurface } from '../media/types'
import type Template from '../template'
// Consumers of the canonical template require these nodes. SSR callers supply
// the same structure and proxy callers supply a media-like element; neither
// contract is proven by a DOM query. Keep this assertion at the entry boundary.
// Template itself and all public query helpers retain nullable query results.
type RequiredPlayerNode = Exclude<keyof TemplateNodes, '$danmuku' | '$controlsCenter' | '$notice' | '$mask' | '$info'>
export type PlayerTemplate<Host extends TemplateHost<Host>> = Template<Host> & {
[Name in RequiredPlayerNode]: NonNullable<TemplateNodes[Name]>
} & { $video: MediaSurface, $mini?: HTMLElement }
export interface TemplateHost<Host> {
id: number
option: {