invalidPluginWithoutId.ts 508 B

123456789101112131415161718192021222324
  1. import UIPlugin from '../UIPlugin.ts'
  2. import type Uppy from '../Uppy.ts'
  3. export default class InvalidPluginWithoutName extends UIPlugin<any, any, any> {
  4. public type: string
  5. public name: string
  6. constructor(uppy: Uppy<any, any>, opts?: any) {
  7. super(uppy, opts)
  8. this.type = 'acquirer'
  9. this.name = this.constructor.name
  10. }
  11. run(results: any) {
  12. this.uppy.log({
  13. class: this.constructor.name,
  14. method: 'run',
  15. results,
  16. })
  17. return Promise.resolve('success')
  18. }
  19. }