Add @constructor to all Function classes

Change-Id: I67b90a91b57fbd66363551eafe0cdfc14d5f68e8
This commit is contained in:
Tao Zhou
2020-01-09 14:51:25 +01:00
parent a1976465f0
commit 6226dd44c6
24 changed files with 33 additions and 5 deletions

View File

@@ -17,6 +17,7 @@
(function(window) {
'use strict';
/** @constructor */
function GrAnnotationActionsInterface(plugin) {
this.plugin = plugin;
// Return this instance when there is an annotatediff event.
@@ -168,6 +169,7 @@
/**
* Used to create an instance of the Annotation Layer interface.
*
* @constructor
* @param {String} path The file path (eg: /COMMIT_MSG').
* @param {String} changeNum The Gerrit change number.
* @param {String} patchNum The Gerrit patch number.

View File

@@ -33,6 +33,7 @@
/**
* @deprecated
* @constructor
*/
function GrChangeReplyInterfaceOld(el) {
this._el = el;

View File

@@ -17,6 +17,7 @@
(function(window) {
'use strict';
/** @constructor */
function GrPluginEndpoints() {
this._endpoints = {};
this._callbacks = {};

View File

@@ -45,13 +45,17 @@
STYLE: 'style',
};
/**
* @constructor
* @param {string=} opt_url
*/
function Plugin(opt_url) {
this._domHooks = new GrDomHooksManager(this);
if (!opt_url) {
console.warn('Plugin not being loaded from /plugins base path.',
'Unable to determine name.');
return;
return this;
}
this.deprecated = {
_loadedGwt: deprecatedAPI._loadedGwt.bind(this),
@@ -226,7 +230,7 @@
* @example
* const pluginRestApi = plugin.restApi(plugin.url());
*
* @param {string} Base url for subsequent .get(), .post() etc requests.
* @param {string=} opt_prefix url for subsequent .get(), .post() etc requests.
*/
Plugin.prototype.restApi = function(opt_prefix) {
return new GrPluginRestApi(opt_prefix);

View File

@@ -29,6 +29,7 @@
* in the text as well as custom links if any are specified in the linkConfig
* parameter.
*
* @constructor
* @param {Object|null|undefined} linkConfig Comment links as specified by the
* commentlinks field on a project config.
* @param {Function} callback The callback to be fired when an intermediate

View File

@@ -23,6 +23,7 @@
// Limit cache size because /change/detail responses may be large.
const MAX_CACHE_SIZE = 30;
/** @constructor */
function GrEtagDecorator() {
this._etags = new Map();
this._payloadCache = new Map();

View File

@@ -20,6 +20,7 @@
// Prevent redefinition.
if (window.GrReviewerUpdatesParser) { return; }
/** @constructor */
function GrReviewerUpdatesParser(change) {
this.result = Object.assign({}, change);
this._lastState = {};

View File

@@ -20,6 +20,7 @@ limitations under the License.
'use strict';
/**
* @constructor
* @param {Object} change A change object resulting from a change detail
* call that includes revision information.
*/