It would be helpful to allow a rejection value to be defined to a Promise.
Perhaps this could be defined as Promise<T, U> where U is the rejection value. Any rejection stuff (e.g. reject, Promise.timeout, Promise.now) could use this value to make Promises more type safe.
It would be helpful to allow a rejection value to be defined to a Promise.
Perhaps this could be defined as
Promise<T, U>whereUis the rejection value. Any rejection stuff (e.g.reject,Promise.timeout,Promise.now) could use this value to make Promises more type safe.