Examples of toFunctionType()


Examples of com.google.javascript.jscomp.newtypes.DeclaredFunctionType.toFunctionType()

      if (ownerType != null) {
        builder.addReceiverType(ownerType.getAsNominalType());
      }
      DeclaredFunctionType result = builder.buildDeclaration();
      if (ctorType != null) {
        ctorType.setCtorFunction(result.toFunctionType());
      }
      return result;
    }

    // We only return a non-null result if the arity of declNode matches the
View Full Code Here

Examples of com.google.javascript.jscomp.newtypes.DeclaredFunctionType.toFunctionType()

        // TODO(dimvar): we must do this for any function "defined" as the rhs
        // of an assignment to a property, not just when the property is a
        // prototype property.
        methodScope = visitFunctionLate(initializer, rawType);
        methodType = methodScope.getDeclaredType();
        propDeclType = JSType.fromFunctionType(methodType.toFunctionType());
      } else {
        JSDocInfo jsdoc = NodeUtil.getBestJSDocInfo(defSite);
        if (jsdoc != null && jsdoc.containsFunctionDeclaration()) {
          // We're parsing a function declaration without a function initializer
          methodScope = null;
View Full Code Here

Examples of com.google.javascript.jscomp.newtypes.DeclaredFunctionType.toFunctionType()

        if (jsdoc != null && jsdoc.containsFunctionDeclaration()) {
          // We're parsing a function declaration without a function initializer
          methodScope = null;
          methodType = computeFnDeclaredType(
              jsdoc, pname, defSite, rawType, currentScope);
          propDeclType = JSType.fromFunctionType(methodType.toFunctionType());
        } else if (jsdoc != null && jsdoc.hasType()) {
          // We are parsing a non-function prototype property
          methodScope = null;
          methodType = null;
          propDeclType =
View Full Code Here

Examples of com.google.javascript.jscomp.newtypes.DeclaredFunctionType.toFunctionType()

            DeclaredFunctionType.meet(methodTypes);
        DeclaredFunctionType updatedMethodType =
            localPropDef.methodType.withTypeInfoFromSuper(superMethodType);
        localPropDef.updateMethodType(updatedMethodType);
        propTypesToProcess.put(pname,
            JSType.fromFunctionType(updatedMethodType.toFunctionType()));
      }
      // Check inherited types of all props
    add_interface_props:
      for (String pname : propTypesToProcess.keySet()) {
        Collection<JSType> defs = propTypesToProcess.get(pname);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.