audiobookshelf/server/PluginAbstract.js
2024-12-19 17:48:18 -06:00

21 lines
422 B
JavaScript

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