/** * Returns a call to $jscomp.arrayFromIterable with {@code iterable} as its argument. */ static Node arrayFromIterable(AbstractCompiler compiler, Node iterable) { JSTypeRegistry registry = compiler.getTypeRegistry(); JSType arrayType = registry.getNativeType(JSTypeNative.ARRAY_TYPE); Node call = callEs6RuntimeFunction(compiler, iterable, "arrayFromIterable").setJSType(arrayType); call.getFirstChild().setJSType(registry.createFunctionTypeWithVarArgs(arrayType)); return call; }
createFunctionTypeWithVarArgs(UNKNOWN_TYPE, UNKNOWN_TYPE); registerNativeType(JSTypeNative.U2U_FUNCTION_TYPE, U2U_FUNCTION_TYPE);
FunctionType u2uFunctionType = createFunctionTypeWithVarArgs(unknownType, unknownType); registerNativeType(JSTypeNative.U2U_FUNCTION_TYPE, u2uFunctionType);