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

@@ -0,0 +1,11 @@
import type * as Definition from './artplayer-plugin-chapter.js'
declare const artplayerPluginChapter: typeof Definition.default
declare namespace artplayerPluginChapter {
type Chapters = Definition.Chapters
type Option = Definition.Option
type Result = Definition.Result
}
export = artplayerPluginChapter
@@ -0,0 +1,2 @@
export { default } from './artplayer-plugin-chapter.cjs'
export type { Chapters, Option, Result } from './artplayer-plugin-chapter.js'
@@ -1,16 +1,16 @@
import type Artplayer from 'artplayer'
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
}