Gets the "promised type" of a promise.
@param type The type of the promise.
@remarks The "promised type" of a type is the type of the "value" parameter of the "onfulfilled" callback.
341656
function getPromisedType(promise) {
            //
            //  { // promise
            //      then( // thenFunction
            //          onfulfilled: ( // onfulfilledParameterType
            //              value: T // valueParameterType
            //          ) => any
            //      ): any;
            //  }
            //
            if (isTypeAny(promise)) {
                return undefined;
            }
            if (promise.flags & 131072 /* Reference */) {
                if (promise.target === tryGetGlobalPromiseType()
                    || promise.target === getGlobalPromiseLikeType()) {
                    return promise.typeArguments[0];
                }
            }
            var globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType();
            if (globalPromiseLikeType === emptyObjectType || !isTypeAssignableTo(promise, globalPromiseLikeType)) {
                return undefined;
            }
            var thenFunction = getTypeOfPropertyOfType(promise, "then");
            if (!thenFunction || isTypeAny(thenFunction)) {
                return undefined;
            }
            var thenSignatures = getSignaturesOfType(thenFunction, 0 /* Call */);
            if (thenSignatures.length === 0) {
                return undefined;
            }
            var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 131072 /* NEUndefined */);
            if (isTypeAny(onfulfilledParameterType)) {
                return undefined;
            }
            var onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0 /* Call */);
            if (onfulfilledParameterSignatures.length === 0) {
                return undefined;
            }
            return getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), /*subtypeReduction*/ true);
        }
1204879
TypeCache.CachedType resolveType(String fullQualifiedName, TypeCache.CachedType<? extends ClassFileDescriptor> dependentType) {
        TypeCache.CachedType cachedType = getTypeResolver().resolve(fullQualifiedName, scannerContext);
        if (!dependentType.equals(cachedType)) {
            dependentType.addDependency(cachedType.getTypeDescriptor());
        }
        return cachedType;
    }
33541
private void setTypeRequested(ResourceType type) {
    synchronized (typeToFirstWait) {
      if (!typeToFirstWait.containsKey(type)) {
        typeToFirstWait.put(type, null);
      }
    }
  }
804599
protected Object getTypedValue(int type, byte[] value)
   {
      Object result;

      switch (type)
      {
         case 4: // Date
         {
            result = MPPUtility.getTimestamp(value, 0);
            break;
         }

         case 6: // Duration
         {
            TimeUnit units = MPPUtility.getDurationTimeUnits(MPPUtility.getShort(value, 4), m_properties.getDefaultDurationUnits());
            result = MPPUtility.getAdjustedDuration(m_properties, MPPUtility.getInt(value, 0), units);
            break;
         }

         case 9: // Cost
         {
            result = Double.valueOf(MPPUtility.getDouble(value, 0) / 100);
            break;
         }

         case 15: // Number
         {
            result = Double.valueOf(MPPUtility.getDouble(value, 0));
            break;
         }

         case 36058:
         case 21: // Text
         {
            result = MPPUtility.getUnicodeString(value, 0);
            break;
         }

         default:
         {
            result = value;
            break;
         }
      }

      return result;
   }
1052458
@NotNull
	@SafeVarargs
	public static <T> Promise<T> firstSuccessful(AsyncSupplier<? extends T>... promises) {
		return first(isResult(), promises);
	}
358864
function(arg, typeSpec) {
				var result = new Deferred();
				var predictions = this._getPredictions(arg.text, typeSpec);
				result.resolve(this._createCompletion(arg.text, predictions));
				return result;
			}
1285802
function(type){
    if (this.peek().type === type) {
      return this.advance();
    } else {
      this.error('INVALID_TOKEN', 'expected "' + type + '", but got "' + this.peek().type + '"', this.peek());
    }
  }
300990
void setDeferredType(Node node, JSType type) {
    // Other parts of this pass may read the not-yet-resolved type off the node.
    // (like when we set the LHS of an assign with a typed RHS function.)
    node.setJSType(type);
    deferredSetTypes.add(new DeferredSetType(node, type));
  }
209974
void expectValidAsyncReturnType(Node n, JSType type) {
    if (promiseOfUnknownType.isSubtypeOf(type)) {
      return;
    }

    JSError err = JSError.make(n, INVALID_ASYNC_RETURN_TYPE, type.toString());
    registerMismatch(type, promiseOfUnknownType, err);
    report(err);
  }
742492
private static <T> TypeReference<T> typeReferenceFrom(final Type type) {
        return new TypeReference<T>() {
            @Override
            public Type getType() {
                return type;
            }
        };
    }
1574
protected TypeValuePairType getTypeValuePair(String type, byte[] value) {
        TypeValuePairType tvp = new TypeValuePairType();
        tvp.setType(type);
        //tvp.setValue(Base64.encodeBase64Chunked(value));
        // the TVP itself base64 encodes now, no need for this
        tvp.setValue(value);
        return tvp;
    }
104367
function( type, object ) {
		if ( typeof type !== "string" ) {
			object = type;
			type = undefined;
		}
		type = type || "fx";
		var defer = jQuery.Deferred(),
			elements = this,
			i = elements.length,
			count = 1,
			deferDataKey = type + "defer",
			queueDataKey = type + "queue",
			markDataKey = type + "mark",
			tmp;
		function resolve() {
			if ( !( --count ) ) {
				defer.resolveWith( elements, [ elements ] );
			}
		}
		while( i-- ) {
			if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
					( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
						jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
					jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
				count++;
				tmp.add( resolve );
			}
		}
		resolve();
		return defer.promise();
	}
634965
public static boolean isFullLengthRequiredForType(String type) {
        boolean result = NAACCR_DATA_TYPE_ALPHA.equals(type);
        result |= NAACCR_DATA_TYPE_DIGITS.equals(type);
        result |= NAACCR_DATA_TYPE_MIXED.equals(type);
        return result;
    }
995452
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 }
  );
}
1237467
public DataPoint type(Type type) {
        if (this.type != type) {
            this.type = type;
            switch (type) {
            case AVERAGE:
            case SUM:
                this.value = 0;
                break;
            case MAXIMUM:
                this.value = Long.MIN_VALUE;
                break;
            case MINIMUM:
                this.value = Long.MAX_VALUE;
                break;
            default:
                this.value = 0;
                break;
            }
            this.numPoints = 0;
        }
        return this;
    }
918567
protected void pushValue(Type type) {
        if (type.getType() == Const.T_VOID) {
            throw new IllegalArgumentException("Can't push void");
        }
        TypeFrame frame = getFrame();
        if (type.getType() == Const.T_LONG) {
            frame.pushValue(Type.LONG);
            frame.pushValue(TypeFrame.getLongExtraType());
        } else if (type.getType() == Const.T_DOUBLE) {
            frame.pushValue(Type.DOUBLE);
            frame.pushValue(TypeFrame.getDoubleExtraType());
        } else {
            frame.pushValue(type);
        }
    }
141632
function Type(opt) {
	CallableValue.call(this);
	this.opt = opt || {};
	this.isReaded = false;
	this.isWritten = false;
}