It might be nice to implement go's defer here too (e.g. for closing the channel) to keep some of the DX.
I guess a JavaScript defer could just be enqueueMicrotask and an anonymous arrow function?
I guess a JavaScript defer could just be enqueueMicrotask and an anonymous arrow function?
I've dabbled in that too, though I don't actually use it for anything, currently: https://github.com/Mcsavvy/contextlib/pull/1