Update version to 5.1.1 and add support for synchronous and asynchronous plugin functions

This commit is contained in:
Harvey Zack committed 2024-01-11 10:40:55 +08:00
1 parent a1063c20ed
commit 3aa30de771
11 files changed
+44 -24

No files matched your search

+3 -1
View File
@@ -1167,7 +1167,9 @@ declare class Artplayer extends Player {
} & Component;
readonly plugins: {
add(plugin: (this: Artplayer, art: Artplayer) => unknown): Artplayer['plugins'];
add(
plugin: (this: Artplayer, art: Artplayer) => any | Promise<any>,
): Promise<Artplayer['plugins']> | Artplayer['plugins'];
[pluginName: string]: any;
};
}