docs: function Promise(resolver) {
    if (!(this instanceof Promise)) {
      throw new TypeError('Constructor Promise requires `new`');
    }
    if (!isFunction(resolver)) {
      throw new TypeError('Must pass resolver function');
    }
  
    /**
     * @type {function(this:Promise,*=,function(*=),function(*=),Deferred):!Promise}
     * @private
     */
    this._state = PendingPromise;
  
    /**
     * @type {*}
     * @private
     */
    this._value = [];
  
    /**
     * @type {boolean}
     * @private
     */
    this._isChainEnd = true;
  
    doResolve(
      this,
      adopter(this, FulfilledPromise),
      adopter(this, RejectedPromise),
      { then: resolver }
    );
  }