mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
fix(types): PKG-CHAPTER-04 preserve CJS ESM and legacy consumer contracts
This commit is contained in:
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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user