v2.0.1: feat: use generic classes to interpret the promise types
The previous version required that promise values were nilable.
i.e. Promise.new(String) == Promise::DeferredPromise(String?)
This is no longer the case
Promise.new(String) == Promise::DeferredPromise(String)
This was achieved by:
- Using generic classes to isolate the return value types of promise callbacks
- Using macros to differentiate between promise and regular return values without creating a union type
- Detecting
NoReturn
where a callback always raises and creating aPromise::DeferredPromise(Nil)
for this case
Otherwise the library functions exactly as before.