mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-04 18:00:45 +02:00
Example of potential plugin implementation
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
class PluginAbstract {
|
||||
constructor() {
|
||||
if (this.constructor === PluginAbstract) {
|
||||
throw new Error('Cannot instantiate abstract class')
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
throw new Error('Method "init()" not implemented')
|
||||
}
|
||||
|
||||
onAction() {
|
||||
throw new Error('Method "onAction()" not implemented')
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
throw new Error('Method "onDestroy()" not implemented')
|
||||
}
|
||||
}
|
||||
module.exports = PluginAbstract
|
||||
Reference in New Issue
Block a user