diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs index 92bb2805ddd7..04e60a96a3ec 100644 --- a/browser/components/customizableui/CustomizableUI.sys.mjs +++ b/browser/components/customizableui/CustomizableUI.sys.mjs @@ -5611,6 +5611,7 @@ export var CustomizableUI = { /** * An iteratable property of windows managed by CustomizableUI. * Note that this can *only* be used as an iterator. ie: + * * for (let window of CustomizableUI.windows) { ... } */ windows: { @@ -7488,11 +7489,11 @@ function XULWidgetSingleWrapper(aWidgetId, aNode, aDocument) { * There are two panels that toolbar items can be overflowed to: * * 1. The default items overflow panel - * This is where built-in default toolbar items will go to. + * This is where built-in default toolbar items will go to. * 2. The Unified Extensions panel - * This is where browser_action toolbar buttons created by extensions will - * go to if the Unified Extensions UI is enabled - otherwise, those items will - * go to the default items overflow panel. + * This is where browser_action toolbar buttons created by extensions will + * go to if the Unified Extensions UI is enabled - otherwise, those items will + * go to the default items overflow panel. * * Finally, OverflowableToolbar manages the showing of the default items * overflow panel when the associated anchor is clicked or dragged over. The diff --git a/browser/components/customizableui/PanelMultiView.sys.mjs b/browser/components/customizableui/PanelMultiView.sys.mjs index a556628c69d7..e28b84e4f366 100644 --- a/browser/components/customizableui/PanelMultiView.sys.mjs +++ b/browser/components/customizableui/PanelMultiView.sys.mjs @@ -382,7 +382,7 @@ export var PanelMultiView = class extends AssociatedToNode { * @memberof PanelMultiView * @param {DOMNode} panelNode * The node that is to be opened. - * @param {...*} args + * @param {...any} args * Additional arguments to be forwarded to the openPopup method of the * panel. * @returns {Promise|boolean} @@ -627,7 +627,7 @@ export var PanelMultiView = class extends AssociatedToNode { * @param {StringOrOpenPopupOptions} options * Either options to use or a string position. This is forwarded to * the openPopup method of the panel. - * @param {...*} args + * @param {...any} args * Additional arguments to be forwarded to the openPopup method of the * panel. * @returns {Promise} @@ -1699,7 +1699,7 @@ export var PanelView = class extends AssociatedToNode { * correct method is called on CustomizableWidget if applicable. * * @see AssociatedToNode.dispatchCustomEvent - * @param {...*} args + * @param {...any} args * Additional arguments to be forwarded to the dispatchCustomEvent method of * AssociatedToNode. */ @@ -1967,6 +1967,7 @@ export var PanelView = class extends AssociatedToNode { * navigate to the previous view, functioning as a shortcut for the view's * back button. * Thus, in LTR mode: + * * - The Right key functions the same as the Enter key, simulating a click * - The Left key triggers a navigation back to the previous view. * diff --git a/browser/components/urlbar/UrlbarPrefs.sys.mjs b/browser/components/urlbar/UrlbarPrefs.sys.mjs index c0211485ac78..0ea13a2ae37f 100644 --- a/browser/components/urlbar/UrlbarPrefs.sys.mjs +++ b/browser/components/urlbar/UrlbarPrefs.sys.mjs @@ -1180,7 +1180,7 @@ class Preferences { * * @param {string} pref * The name of the preference to get. - * @returns {*} The preference value. + * @returns {any} The preference value. */ get(pref) { let value = this._map.get(pref); @@ -1199,7 +1199,7 @@ class Preferences { * * @param {string} pref * The name of the preference to set. - * @param {*} value The preference value. + * @param {any} value The preference value. */ set(pref, value) { let { defaultValue, set } = this._getPrefDescriptor(pref); @@ -1215,7 +1215,7 @@ class Preferences { * * @param {string} pref * The name of the preference to set. - * @param {*} value + * @param {any} value * The preference value. */ add(pref, value) { @@ -1262,7 +1262,7 @@ class Preferences { * * @param {string} pref * The name of the preference to clear. - * @returns {*} The preference value. + * @returns {any} The preference value. */ getScotchBonnetPref(pref) { return this.get("scotchBonnet.enableOverride") || this.get(pref); @@ -1475,7 +1475,7 @@ class Preferences { * * @param {string} pref * The name of the preference to get. - * @returns {*} The raw preference value. + * @returns {any} The raw preference value. */ _readPref(pref) { let { defaultValue, get } = this._getPrefDescriptor(pref); @@ -1493,7 +1493,7 @@ class Preferences { * * @param {string} pref * The name of the preference to get. - * @returns {*} The validated and/or fixed-up preference value. + * @returns {any} The validated and/or fixed-up preference value. */ _getPrefValue(pref) { switch (pref) { diff --git a/browser/components/urlbar/UrlbarUtils.sys.mjs b/browser/components/urlbar/UrlbarUtils.sys.mjs index 2edcb3e7058b..50cc68cb0fba 100644 --- a/browser/components/urlbar/UrlbarUtils.sys.mjs +++ b/browser/components/urlbar/UrlbarUtils.sys.mjs @@ -1949,8 +1949,8 @@ export class UrlbarProvider { * overridden. * * @param {string} methodName The name of the method to call. - * @param {*} args The method arguments. - * @returns {*} The return value of the method, or undefined if the method + * @param {any} args The method arguments. + * @returns {any} The return value of the method, or undefined if the method * throws an error. * @abstract */ diff --git a/testing/mochitest/tests/SimpleTest/EventUtils.js b/testing/mochitest/tests/SimpleTest/EventUtils.js index 5bd02bfbcc63..5bc437f999ab 100644 --- a/testing/mochitest/tests/SimpleTest/EventUtils.js +++ b/testing/mochitest/tests/SimpleTest/EventUtils.js @@ -1810,7 +1810,7 @@ function synthesizeAndWaitNativeMouseMove( * @param {number} [aEvent.repeat] * If you emulate auto-repeat, you should set the count of repeat. * This method will automatically synthesize keydown (and keypress). - * @param {*} aEvent.location + * @param {any} aEvent.location * If you want to specify this, you can specify this explicitly. * However, if you don't specify this value, it will be computed * from code value. @@ -3468,7 +3468,7 @@ function synthesizeDragOver( * Emulate the drop event and mouseup event. * This should be called after synthesizeDragOver. * - * @param {*} aResult + * @param {any} aResult * The first element of the array returned from ``synthesizeDragOver``. * @param {DataTransfer} aDataTransfer * The second element of the array returned from ``synthesizeDragOver``. diff --git a/testing/modules/Assert.sys.mjs b/testing/modules/Assert.sys.mjs index 3807f4b6ea09..c6b9f38d5317 100644 --- a/testing/modules/Assert.sys.mjs +++ b/testing/modules/Assert.sys.mjs @@ -209,9 +209,9 @@ Assert.prototype.setReporter = function (reporterFunc) { * * @param {boolean} failed * Indicates if the assertion failed or not. - * @param {*} actual + * @param {any} actual * The result of evaluating the assertion. - * @param {*} [expected] + * @param {any} [expected] * Expected result from the test author. * @param {string} [message] * Short explanation of the expected result. @@ -267,7 +267,7 @@ Assert.prototype.report = function ( * To test strictly for the value true, use ``assert.strictEqual(true, guard, * message_opt);``. * - * @param {*} value + * @param {any} value * Test subject to be evaluated as truthy. * @param {string} [message] * Short explanation of the expected result. @@ -290,9 +290,9 @@ Assert.prototype.ok = function (value, message) { * 5. The equality assertion tests shallow, coercive equality with ==. * ``assert.equal(actual, expected, message_opt);`` * - * @param {*} actual + * @param {any} actual * Test subject to be evaluated as equivalent to ``expected``. - * @param {*} expected + * @param {any} expected * Test reference to evaluate against ``actual``. * @param {string} [message] * Short explanation of the expected result. @@ -308,9 +308,9 @@ Assert.prototype.equal = function equal(actual, expected, message) { * @example * assert.notEqual(actual, expected, message_opt); * - * @param {*} actual + * @param {any} actual * Test subject to be evaluated as NOT equivalent to ``expected``. - * @param {*} expected + * @param {any} expected * Test reference to evaluate against ``actual``. * @param {string} [message] * Short explanation of the expected result. @@ -328,9 +328,9 @@ Assert.prototype.notEqual = function notEqual(actual, expected, message) { * `JSON.stringify` is not designed to be used for this purpose; objects may * have ambiguous `toJSON()` implementations that would influence the test. * - * @param {*} actual + * @param {any} actual * Test subject to be evaluated as equivalent to ``expected``, including nested properties. - * @param {*} expected + * @param {any} expected * Test reference to evaluate against ``actual``. * @param {string} [message] * Short explanation of the expected result. @@ -350,10 +350,10 @@ Assert.prototype.deepEqual = function deepEqual(actual, expected, message) { * 8. The non-equivalence assertion tests for any deep inequality. * assert.notDeepEqual(actual, expected, message_opt); * - * @param {*} actual + * @param {any} actual * Test subject to be evaluated as NOT equivalent to ``expected``, including nested * properties. - * @param {*} expected + * @param {any} expected * Test reference to evaluate against ``actual``. * @param {string} [message] * Short explanation of the expected result. @@ -377,9 +377,9 @@ Assert.prototype.notDeepEqual = function notDeepEqual( * 9. The strict equality assertion tests strict equality, as determined by ===. * ``assert.strictEqual(actual, expected, message_opt);`` * - * @param {*} actual + * @param {any} actual * Test subject to be evaluated as strictly equivalent to ``expected``. - * @param {*} expected + * @param {any} expected * Test reference to evaluate against ``actual``. * @param {string} [message] * Short explanation of the expected result. @@ -392,9 +392,9 @@ Assert.prototype.strictEqual = function strictEqual(actual, expected, message) { * 10. The strict non-equality assertion tests for strict inequality, as * determined by !==. ``assert.notStrictEqual(actual, expected, message_opt);`` * - * @param {*} actual + * @param {any} actual * Test subject to be evaluated as NOT strictly equivalent to ``expected``. - * @param {*} expected + * @param {any} expected * Test reference to evaluate against ``actual``. * @param {string} [message] * Short explanation of the expected result. diff --git a/toolkit/actors/PopupAndRedirectBlockingParent.sys.mjs b/toolkit/actors/PopupAndRedirectBlockingParent.sys.mjs index 168addef8083..1eb64b8ffba8 100644 --- a/toolkit/actors/PopupAndRedirectBlockingParent.sys.mjs +++ b/toolkit/actors/PopupAndRedirectBlockingParent.sys.mjs @@ -89,7 +89,7 @@ export class PopupAndRedirectBlocker { * Event callback for the notification that is shown when a popup or * redirect is blocked. This is used in the observer. * - * @param {*} reason + * @param {any} reason */ eventCallback(reason) { if (reason == "dismissed") { diff --git a/toolkit/components/extensions/ConduitsParent.sys.mjs b/toolkit/components/extensions/ConduitsParent.sys.mjs index aa42ed150703..5ab6166c7947 100644 --- a/toolkit/components/extensions/ConduitsParent.sys.mjs +++ b/toolkit/components/extensions/ConduitsParent.sys.mjs @@ -24,7 +24,7 @@ * @property {string[]} [query] * @property {string[]} [cast] * - * @property {*} [actor] + * @property {any} [actor] * @property {boolean} [verified] * @property {string} [url] * @property {number} [frameId] diff --git a/toolkit/components/extensions/ExtensionCommon.sys.mjs b/toolkit/components/extensions/ExtensionCommon.sys.mjs index 4e079770534d..6454baad48bc 100644 --- a/toolkit/components/extensions/ExtensionCommon.sys.mjs +++ b/toolkit/components/extensions/ExtensionCommon.sys.mjs @@ -823,7 +823,7 @@ export class BaseContext { * The optional caller frame which triggered this callback, to be used * in error reporting. * @param {Function} callback The callback to call. - * @returns {*} The return value of callback. + * @returns {any} The return value of callback. */ withLastError(error, caller, callback) { this.lastError = this.normalizeError(error); @@ -998,7 +998,7 @@ export class SchemaAPIInterface { * * @abstract * @param {Array} _args The parameters for the function. - * @returns {*} The return value of the invoked function. + * @returns {any} The return value of the invoked function. */ callFunction(_args) { throw new Error("Not implemented"); @@ -1034,7 +1034,7 @@ export class SchemaAPIInterface { * Retrieves the value of this as a property. * * @abstract - * @returns {*} The value of the property. + * @returns {any} The value of the property. */ getProperty() { throw new Error("Not implemented"); @@ -1311,7 +1311,7 @@ class CanOfAPIs { * * @param {string} path * The "."-separated path to find. - * @returns {*} + * @returns {any} */ findAPIPath(path) { if (this.apiPaths.has(path)) { @@ -1581,7 +1581,7 @@ class SchemaAPIManager extends EventEmitter { * @param {string} entry * The name of the top-level manifest entry. * - * @returns {*} + * @returns {any} */ emitManifestEntry(extension, entry) { let apiName = this.manifestKeys.get(entry); diff --git a/toolkit/components/extensions/ExtensionStorage.sys.mjs b/toolkit/components/extensions/ExtensionStorage.sys.mjs index 9d4bd140aa2b..1262f6f17b3c 100644 --- a/toolkit/components/extensions/ExtensionStorage.sys.mjs +++ b/toolkit/components/extensions/ExtensionStorage.sys.mjs @@ -80,7 +80,7 @@ class SerializeableMap extends Map { * reports. If `null`, then `name` will be used instead. * @param {StructuredCloneHolder|*} value * A value to serialize. - * @returns {*} + * @returns {any} */ function serialize(name, anonymizedName, value) { if (value && typeof value === "object" && !isStructuredCloneHolder(value)) { diff --git a/toolkit/components/extensions/NativeMessaging.sys.mjs b/toolkit/components/extensions/NativeMessaging.sys.mjs index 32aa4dc52671..89eb1ac96e51 100644 --- a/toolkit/components/extensions/NativeMessaging.sys.mjs +++ b/toolkit/components/extensions/NativeMessaging.sys.mjs @@ -224,7 +224,7 @@ export class NativeApp extends EventEmitter { /** * @param {BaseContext} context The scope from where `message` originates. - * @param {*} message A message from the extension, meant for a native app. + * @param {any} message A message from the extension, meant for a native app. * @returns {ArrayBufferLike} An ArrayBuffer that can be sent to the native app. */ static encodeMessage(context, message) { diff --git a/toolkit/components/extensions/Schemas.sys.mjs b/toolkit/components/extensions/Schemas.sys.mjs index 294189e896ef..093b045bd3b4 100644 --- a/toolkit/components/extensions/Schemas.sys.mjs +++ b/toolkit/components/extensions/Schemas.sys.mjs @@ -765,7 +765,7 @@ class Context { * * @param {string} component * @param {Function} callback - * @returns {*} + * @returns {any} */ withPath(component, callback) { this.path.push(component); @@ -1464,9 +1464,9 @@ class Entry { * Preprocess the given value with the preprocessor declared in * `preprocessor`. * - * @param {*} value + * @param {any} value * @param {Context} context - * @returns {*} + * @returns {any} */ preprocess(value, context) { if (this.preprocessor) { diff --git a/toolkit/components/extensions/parent/ext-tabs-base.js b/toolkit/components/extensions/parent/ext-tabs-base.js index 99c6f5572913..522a443d669a 100644 --- a/toolkit/components/extensions/parent/ext-tabs-base.js +++ b/toolkit/components/extensions/parent/ext-tabs-base.js @@ -1480,7 +1480,7 @@ class TabTrackerBase extends EventEmitter { * * @param {integer} _tabId * The numeric ID of the tab to return. - * @param {*} _default + * @param {any} _default * The value to return if no tab exists with the given ID. * * @returns {NativeTab} @@ -2420,7 +2420,7 @@ class WindowManagerBase { * * @param {DOMWindow} window * The browser window to convert. - * @param {*} args + * @param {any} args * Additional arguments to be passed to {@link WindowBase#convert}. * * @returns {object} diff --git a/toolkit/components/ml/content/backends/ONNXPipeline.mjs b/toolkit/components/ml/content/backends/ONNXPipeline.mjs index 533a7e162b13..a5e658332f7a 100644 --- a/toolkit/components/ml/content/backends/ONNXPipeline.mjs +++ b/toolkit/components/ml/content/backends/ONNXPipeline.mjs @@ -622,7 +622,7 @@ export class ONNXPipeline { * * @param {object} mlEngineWorker - Implements the Cache interface and used to get models * @param {object} config - The configuration options - * @param {*} errorFactory - error class passed by the backend factory. + * @param {any} errorFactory - error class passed by the backend factory. */ constructor(mlEngineWorker, config, errorFactory) { this.#errorFactory = errorFactory; @@ -794,7 +794,7 @@ export class ONNXPipeline { * @param {object} mlEngineWorker - Implements the Cache interface and used to get models * @param {ArrayBuffer} runtime - The runtime wasm file. * @param {PipelineOptions} options - The options for initialization. - * @param {*} errorFactory - error class passed by the backend factory. + * @param {any} errorFactory - error class passed by the backend factory. * @returns {Promise} The initialized pipeline instance. */ static async initialize(mlEngineWorker, runtime, options, errorFactory) {