UNPKG

narrative-studio-sdk

Version:

Narrative SDK for building apps on the Narrative Studio

18 lines (17 loc) 419 B
export class EventBase { get type() { return this.constructor.type; } static get type() { if (!this.eventType) throw new Error('Event type not defined'); return this.eventType; } } export class ChangesSavedEvent extends EventBase { constructor(changes) { super(); this.changes = changes; } } ChangesSavedEvent.eventType = 'ChangesSavedEvent';