why does `Promise.reject()` require a `Throwable` ...
# javascript
t
why does
Promise.reject()
require a
Throwable
argument while in JS you can reject with any value?
g
Probably it was concidered as more correct, or just following some standard. Anyway, you can define own extension for promise where you can pass any type
t
no, the compiler tells me, that extension functions cannot be
external
i
Do you need it to be external? Define it as a regular extension that calls
this.asDynamic().reject(...)
t
ok true