| 12345678910111213141516171819202122232425262728293031323334 |
- import { Context } from '@nuxt/types/app'
- import { AnyJson, DataProviderArgs } from '~/types/interfaces'
- import Hookable from '~/services/data/hookable'
- class BaseProcessor extends Hookable {
- protected arguments!: DataProviderArgs;
- protected ctx!: Context;
- constructor (ctx: Context, args: DataProviderArgs) {
- super()
- this.arguments = args
- this.ctx = ctx
- }
- /**
- * Is the given argument a supported model
- * @param _args
- */
- public static support (_args: DataProviderArgs): boolean {
- throw new Error('Not implemented')
- }
- /**
- * Process and return the given data to the Provider
- *
- * @param _data
- */
- // eslint-disable-next-line require-await
- public async process (_data: AnyJson): Promise<any> {
- throw new Error('Not implemented')
- }
- }
- export default BaseProcessor
|