Skip to content
Snippets Groups Projects

feat(shared): base event setup

Merged 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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading