fix(types): PKG-CHAPTER-04 preserve CJS ESM and legacy consumer contracts

This commit is contained in:
Harvey Zhao committed 2026-09-10 23:29:06 +08:00
1 parent 48660c4e12
commit bab80ff886
41 files changed
+1087 -119

No files matched your search

+1
View File
@@ -71,6 +71,7 @@
'./assets/ts/artplayer-proxy-mediabunny.d.ts',
'./assets/ts/artplayer-tool-iframe.d.ts',
'./assets/ts/artplayer.d.ts',
'./assets/ts/artplayer-i18n.d.ts',
]
for (let index = 0; index < libUris.length; index++) {
+4
View File
@@ -0,0 +1,4 @@
declare module 'artplayer/i18n/*' {
const language: NonNullable<Artplayer.I18n['en']>
export default language
}
+3 -3
View File
@@ -1,14 +1,14 @@
type Chapters = {
export type Chapters = {
start: number
end: number
title: string
}[]
interface Option {
export interface Option {
chapters?: Chapters
}
interface Result {
export interface Result {
name: 'artplayerPluginChapter'
update: (option: Option) => void
}
-6
View File
@@ -750,12 +750,6 @@ interface I18nValue {
export type I18n = Partial<Record<I18nKeys, Partial<I18nValue>>>
declare module 'artplayer/i18n/*' {
const lang: Partial<I18nValue>
// @ts-expect-error TS2666
export default lang
}
export type Bar = 'loaded' | 'played' | 'hover'
export interface Events {