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 .