A Result represents a promise for the result of an async operation.
It implements the full ES6 Promise specification and is in all respects equivalent to a Promise.
Adapted from https://www.npmjs.com/package/@types/es6-promise
Get the 'Promise' string tag
onFinally is invoked when/if the Result settles (either rejects or fullfils);
called when/if the Result settles
Chain a Result.
fullfilled is called when/if the Result resolves.
rejected is called when/if the Result rejects.
Both are optional, if either/both are omitted the next
rejected in the chain is called.
Both callbacks have a single parameter , the fullfilment value or rejection reason.
the callback that is invoked when the Result is fullfilled
the callback that is invoked when the Result is rejected.
a new Result that resolves with the value you return from
rejected. If an error is thrown in the callback, the
returned promise rejects with that error.