mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
test(chapter): PKG-CHAPTER-02 cover behavior and optional factory types
This commit is contained in:
1 parent
701749520b
commit
12b047f9a6
17 files changed
+624
-15
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import type Artplayer from 'artplayer'
|
||||
import chapter from 'artplayer-plugin-chapter'
|
||||
|
||||
declare const art: Artplayer
|
||||
chapter()
|
||||
chapter(undefined)
|
||||
chapter({})
|
||||
chapter({ chapters: [] })(art).update({})
|
||||
const name: 'artplayerPluginChapter' = chapter()(art).name
|
||||
void name
|
||||
// @ts-expect-error The update object remains required.
|
||||
chapter()(art).update()
|
||||
// @ts-expect-error A chapter title remains a string.
|
||||
chapter({ chapters: [{ start: 0, end: 1, title: 12 }] })
|
||||
// @ts-expect-error null is not an options object.
|
||||
chapter(null)
|
||||
Reference in new issue
Block a user