event-driven-io / emmett

Emmett - a Node.js library taking your event-driven applications back to the future!
https://event-driven-io.github.io/emmett/
195 stars 19 forks source link

Fix `CommandHandler` type definition for `handleOptions` #123

Closed alex-laycalvert closed 1 month ago

alex-laycalvert commented 1 month ago

The original code specified that handleOptions was of the type HandleOptions<StreamVersion, EventStore<...>> using the emmett EventStore instead of the generic Store. This prevented TS from allowing you to pass any custom options from a custom implementation of event store to the command handler.

This fixes what I assume was a typo and allows you to have custom options again.

alex-laycalvert commented 1 month ago

@oskardudycz thank you for all you do

oskardudycz commented 1 month ago

The original code specified that handleOptions was of the type HandleOptions<StreamVersion, EventStore<...>> using the emmett EventStore instead of the generic Store. This prevented TS from allowing you to pass any custom options from a custom implementation of event store to the command handler.

This fixes what I assume was a typo and allows you to have custom options again.

Yup, that was my copy/paste mistake; I apologise for that and thank you for fixing it. I'm pulling that in and making the new release.

@oskardudycz thank you for all you do

I thank you; you've made my day with this comment ❤️