mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-17 18:11:20 -08:00
test(vtt-thumbnail): [PKG-VTT-THUMB-04] verify historical module forms and type conflicts
This commit is contained in:
1 parent
db358a3ae4
commit
0c5bb2bd7a
11 files changed
+961
-15
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import type Artplayer from 'artplayer'
|
||||
// eslint-disable-next-line ts/no-require-imports -- Exercise historical export-assignment consumers.
|
||||
import plugin = require('artplayer-plugin-vtt-thumbnail')
|
||||
|
||||
const vtt = plugin
|
||||
declare const art: Artplayer
|
||||
const options: Parameters<typeof vtt>[0] = {}
|
||||
const result: ReturnType<ReturnType<typeof vtt>> = { name: 'artplayerPluginVttThumbnail' }
|
||||
const replacement: typeof vtt = (_option: Parameters<typeof vtt>[0]) => (_art: Artplayer) => result
|
||||
void vtt(options)(art).name
|
||||
void replacement
|
||||
@@ -0,0 +1,7 @@
|
||||
import type { Factory } from 'artplayer-plugin-vtt-thumbnail'
|
||||
|
||||
declare const replacement: Factory
|
||||
const required: Factory & { default: Factory } = replacement
|
||||
const optional: Factory & { default?: Factory } = replacement
|
||||
optional.default({})
|
||||
void required
|
||||
Reference in new issue
Block a user