Skip to content

feat(shared): base event setup

Berend Sliedrecht requested to merge event-restructuring into main

Created a new event structure which is basically the following:

type BaseEvent<T extends Record<string, unknown>> = {
  id: string, // UUID
  timestamp: Date, // new Date() on construction
  type: string, // class name
  data: T // The data payload
}

Sadly I could not use pure types as reflection is not the best yet in TypeScript so this will do. Creating new Events is quite easy as can be seen in the EventDidcommConnectionsGetAll class.

Merge request reports

Loading