mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 03:46:16 -08:00
11 lines
462 B
TypeScript
11 lines
462 B
TypeScript
import type Artplayer from './artplayer'
|
|
|
|
export type PluginFactory<Host = Artplayer, Result = unknown> = (this: Host, art: Host) => Result
|
|
|
|
/** Augment this interface with installed plugin results; augmentation does not register a plugin. */
|
|
export interface Plugins {
|
|
/** Legacy signature: synchronous factories return this registry; Promise factories return a Promise of it. */
|
|
add: (plugin: PluginFactory) => Promise<Plugins>
|
|
[name: string]: unknown
|
|
}
|