Open HaraldNordgren opened 2 months ago
Hi @benjaminjkraft, I landed on this quite minimal refactor in the end. Let me know if you think it's useful or not.
I could also be fine with throwing this away. My real goal was to avoid the type casting of interfaceChan
but I couldn't figure out a way to do it without making the library harder to use, which definitely would have been a bad thing.
@benjaminjkraft Thanks a lot for your feedback! I have thought about this a lot, and I think you are absolutely right. Introducing generics on the client layer like I did, would worsen the user experience. So it's not worth doing.
I will reduce the scope of this PR and still see if I find any useful refactor using generics 🤗