huridocs/uwazi

View on GitHub
app/api/eventsbus/AbstractEvent.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
abstract class AbstractEvent<T> {
  private data: T;

  constructor(data: T) {
    this.data = data;
  }

  getData() {
    return this.data;
  }

  getName() {
    return this.constructor.name;
  }
}

export { AbstractEvent };