code: function getApparentTypeOfTypeParameter(type) {
              if (!type.resolvedApparentType) {
                  var constraintType = getConstraintOfTypeParameter(type);
                  while (constraintType && constraintType.flags & 16384 /* TypeParameter */) {
                      constraintType = getConstraintOfTypeParameter(constraintType);
                  }
                  type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type);
              }
              return type.resolvedApparentType;
          }
docs: The apparent type of a type parameter is the base constraint instantiated with the type parameter
  as the type argument for the 'this' type.