Bug 1870226 - Fix missing jsdoc @returns for search code. r=search-reviewers,jteow

Differential Revision: https://phabricator.services.mozilla.com/D219507
This commit is contained in:
Mark Banner
2024-08-23 08:55:47 +00:00
parent b756ce936d
commit 52e5a0d84f
4 changed files with 13 additions and 1 deletions

View File

@@ -44,7 +44,9 @@ export var SearchUIUtils = {
* icon. This value may be overridden by an icon specified in the
* engine description file.
* @param {object} browsingContext
* The browsing context any error prompt should be opened for.
* The browsing context any error prompt should be opened for.
* @returns {boolean}
* Returns true if the engine was added.
*/
async addOpenSearchEngine(locationURL, image, browsingContext) {
try {

View File

@@ -54,6 +54,9 @@ export class SearchEngineSelector {
/**
* Handles getting the configuration from remote settings.
*
* @returns {object}
* The configuration data.
*/
async getEngineConfiguration() {
if (this._getConfigurationPromise) {
@@ -90,6 +93,9 @@ export class SearchEngineSelector {
/**
* Used by tests to get the configuration overrides.
*
* @returns {object}
* The engine overrides data.
*/
async getEngineConfigurationOverrides() {
await this.getEngineConfiguration();

View File

@@ -365,6 +365,8 @@ class _SearchTestUtils {
*
* @param {Array} engineConfigurations
* An array of engine configurations.
* @returns {AppProvidedSearchEngine[]}
* An array of app provided search engine objects.
*/
async searchConfigToEngines(engineConfigurations) {
return engineConfigurations.map(

View File

@@ -325,6 +325,8 @@ async function getFileDataBuffer(filename) {
* The ID to use for the record. If not provided, a new UUID will be generated.
* @param {number} [item.lastModified]
* The last modified time for the record. Defaults to the current time.
* @returns {object}
* An object containing the record and attachment.
*/
async function mockRecordWithAttachment({
filename,