From b57db23f7b87444eb0b916effb8c17184dfc41cc Mon Sep 17 00:00:00 2001 From: Ole Rehmsen Date: Tue, 18 Sep 2018 17:26:16 +0200 Subject: [PATCH] Fix compile errors caused by Function<> types Apparently templating upper case Function is not supported: When turning on compilation_mode="SIMPLE", they cause errors like: [internal]:27809 ERROR - Too many template parameters I checked the docs: https://github.com/google/closure-compiler/wiki/Types-in-the-Closure-Type-System Under "Instance Type": "Also avoid using Function in favor of the more specific function(...): ..." Change-Id: I1cffbee0a7922be0fb7b40d3db6144aece46e0da --- .../gr-annotation-actions-js-api.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js index cb8409e153..47281c28bb 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js @@ -34,7 +34,7 @@ * Register a function to call to apply annotations. Plugins should use * GrAnnotationActionsContext.annotateRange to apply a CSS class to a range * within a line. - * @param {Function} addLayerFunc The function + * @param {function(GrAnnotationActionsContext)} addLayerFunc The function * that will be called when the AnnotationLayer is ready to annotate. */ GrAnnotationActionsInterface.prototype.addLayer = function(addLayerFunc) { @@ -45,7 +45,7 @@ /** * The specified function will be called with a notify function for the plugin * to call when it has all required data for annotation. Optional. - * @param {Function>} notifyFunc See + * @param {function(function(String, Number, Number, String))} notifyFunc See * doc of the notify function below to see what it does. */ GrAnnotationActionsInterface.prototype.addNotifier = function(notifyFunc) { @@ -68,7 +68,7 @@ * * @param {String} checkboxLabel Will be used as the label for the checkbox. * Optional. "Enable" is used if this is not specified. - * @param {Function} onAttached The function that will be called + * @param {function(HTMLElement)} onAttached The function that will be called * when the checkbox is attached to the page. */ GrAnnotationActionsInterface.prototype.enableToggleCheckbox = function( @@ -134,7 +134,7 @@ * @param {String} path The file path (eg: /COMMIT_MSG'). * @param {String} changeNum The Gerrit change number. * @param {String} patchNum The Gerrit patch number. - * @param {Function} addLayerFunc The function + * @param {function(GrAnnotationActionsContext)} addLayerFunc The function * that will be called when the AnnotationLayer is ready to annotate. */ function AnnotationLayer(path, changeNum, patchNum, addLayerFunc) { @@ -148,7 +148,7 @@ /** * Register a listener for layer updates. - * @param {Function} fn The update handler function. + * @param {function(Number, Number, String)} fn The update handler function. * Should accept as arguments the line numbers for the start and end of * the update and the side as a string. */