in packages/sdk/src/AccessiblePromise.ts [9:27]
protected constructor(value: any, rejected?: boolean) {
this.#value = value;
if (isPromiseLike(value)) {
// both value and reason can be promise like in which case we are still pending
this.#state = 'PENDING';
value.then(
v => {
this.#state = 'RESOLVED';
this.#value = v;
},
reason => {
this.#state = 'REJECTED';
this.#value = reason;
},
);
} else {
this.#state = rejected ? 'REJECTED' : 'RESOLVED';
}
}