import type Artplayer from 'artplayer' import type { Factory, Option, Result } from 'artplayer-plugin-auto-thumbnail/runtime' import runtime from 'artplayer-plugin-auto-thumbnail/runtime' type Equal = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? true : false type Assert = T type ExactFactory = Assert> type ExactOption = Assert, [option: Option]>> type ExactResult = Assert>, Promise>> declare const art: Artplayer const option: Option = { url: '/video.mp4', width: 80, number: 12, scale: 0.5, height: 90 } const pending: Promise = runtime(option)(art) const name: Promise<'artplayerPluginAutoThumbnail'> = pending.then(value => value.name) const plugins: NonNullable = [runtime(option)] const replacement: Factory = _option => async _art => ({ name: 'artplayerPluginAutoThumbnail' }) void [name, plugins, replacement] export type { ExactFactory, ExactOption, ExactResult }