BramComyn / safeguard-fetch

0 stars 0 forks source link

Wrappers #38

Closed BramComyn closed 1 month ago

BramComyn commented 1 month ago

📁 Related issues

✍️ Description

This is the first part of writing the interface as we talked about. I have tried to keep this as simple and clean as possible. I also have written the interfaces for any of the other types of events that can be triggered by an request stream, but have not yet committed and pushed these files. My idea was to wait for your opinion on this architecture and then include the following changes once I wrote the session-side of the handlers.

BramComyn commented 1 month ago

I will obviously first solve the linter error...

BramComyn commented 1 month ago

@joachimvh, I have found a larger problem concerning typing:

Each of my different CustomEventHandler interfaces has to take all of the arguments provided when their corresponding event is emitted, but when I don't know how to declare this as 'an array of arguments of a certain type, but only these combinations" in this file: src/handler/CustomRequestEventHandler.ts.

Is this a code smell, or is there a good way to solve this issue in TypeScript?

EDIT: I am well aware that this PR cannot be merged, as this error prevents any of this code to be run, let alone tested