third_party/closure-compiler/src/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
/**
   * Creates a new function type based on an existing function type but
   * with a new return type.
   * @param existingFunctionType the existing function type.
   * @param returnType the new return type.
   */
Creates a new function type based on an existing function type but
with a new return type.
@param existingFunctionType the existing function type.
@param returnType the new return type.
Creates a new function type based on an existing function type but with a new return type . @param existingFunctionType the existing function type . @param returnType the new return type .
public FunctionType createFunctionTypeWithNewReturnType(
      FunctionType existingFunctionType, JSType returnType) {
    return FunctionType.builder(this)
        .copyFromOtherFunction(existingFunctionType)
        .withReturnType(returnType)
        .build();
  }
public FunctionType createFunctionTypeWithNewReturnType ( FunctionType existingFunctionType , JSType returnType ) { return FunctionType . builder ( this ) . copyFromOtherFunction ( existingFunctionType ) . withReturnType ( returnType ) . build ( ) ; }
Creates a new function type based on an existing function type but
 with a new return type.
Creates a new function type based on an existing function type but with a new return type .