3 ms·
I was thinking you could use them to specialize the IO types to prevent accidentally calling the wrong type of function in the wrong place. Say you have a `Ser
by Widdershin 4y ago
I was thinking you could use them to specialize the IO types to prevent accidentally calling the wrong type of function in the wrong place.
Say you have a `ServerIO a` and `ClientIO a` type. Browser APIs, like addEventListener, would use the ClientIO type. Server specific APIs like fs would use the ServerIO type. That would prevent the entire issue I've described, and allowing users to confidently make changes to their shared code.