baseHook.ts 525 B

12345678910111213141516171819202122
  1. import { DataProviderArgs } from '~/types/interfaces'
  2. import Hookable from "~/services/data/hookable";
  3. abstract class BaseHook {
  4. public static priority = 255
  5. protected parent: Hookable;
  6. constructor(parent: Hookable) {
  7. this.parent = parent
  8. }
  9. // eslint-disable-next-line require-await
  10. async invoke (_args: DataProviderArgs): Promise<any> {
  11. throw new Error('Not implemented')
  12. }
  13. static support (_args: DataProviderArgs): boolean {
  14. throw new Error('Not implemented')
  15. }
  16. }
  17. export default BaseHook