The result of a promise. It can either be fulfilled with a value, or rejected with a reason.
0.5.0
The type of the rejected reason.
const result: IPromiseResult<number> = { status: "fulfilled", value: 42};const result: IPromiseResult<number> = { status: "rejected", reason: "Hello Darkness"}; Copy
const result: IPromiseResult<number> = { status: "fulfilled", value: 42};const result: IPromiseResult<number> = { status: "rejected", reason: "Hello Darkness"};
The type of the fulfilled value.
Optional
The reason that the promise was rejected with.
A string indicating whether the promise was fulfilled or rejected
The value that the promise was fulfilled with.
The result of a promise. It can either be fulfilled with a value, or rejected with a reason.
Since
0.5.0
Type Param: U
The type of the rejected reason.
Example