Skip to content

Conversation

@dgoerdes
Copy link
Contributor

@dgoerdes dgoerdes commented Feb 9, 2026

Enhances the input type for createCommand, createQuery and createEvent for better type safety and validation.

Copilot AI review requested due to automatic review settings February 9, 2026 20:09
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines the createCommand, createQuery, and createEvent input types to improve compile-time type safety by making the input types generic and tying fields like data (and potentially type) to the provided message subtype.

Changes:

  • Make CreateCommandInput, CreateQueryInput, and CreateEventInput generic so type/source/data reflect the chosen T* message type.
  • Refactor createCommand/createQuery/createEvent to accept a single input parameter and build the message from it.
  • Fix a documentation spelling typo in event.ts (“incomming” → “incoming”).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/core/src/lib/message/query.ts Makes CreateQueryInput generic and updates createQuery to use the new typed input object.
packages/core/src/lib/message/event.ts Makes CreateEventInput generic, refactors createEvent input handling, and fixes a doc typo.
packages/core/src/lib/message/command.ts Makes CreateCommandInput generic and updates createCommand to use the new typed input object.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dgoerdes dgoerdes merged commit 403a490 into main Feb 9, 2026
2 checks passed
@dgoerdes dgoerdes deleted the feature/ensure-valid-type-checks branch February 9, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant