protected constructor()

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.#status = 'pending';
      value.then(
        v => {
          this.#status = 'fulfilled';
          this.#value = v;
        },
        reason => {
          this.#status = 'rejected';
          this.#value = reason;
        },
      );
    } else {
      this.#status = rejected ? 'rejected' : 'fulfilled';
    }
  }