Skip to content

Commit f846e0c

Browse files
committed
Bug 1861865 - Fix ESLint valid-jsdoc issues in textrecognition.mjs. r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D192160
1 parent 772ab6e commit f846e0c

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ module.exports = {
247247
"browser/components/sessionstore/**",
248248
"browser/components/storybook/.storybook/**",
249249
"browser/components/tests/browser/**",
250-
"browser/components/textrecognition/textrecognition.mjs",
251250
"browser/components/touchbar/tests/browser/browser_touchbar_searchrestrictions.js",
252251
"browser/components/uitour/UITour*",
253252
"browser/extensions/pictureinpicture/**",

browser/components/textrecognition/textrecognition.mjs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ window.addEventListener("DOMContentLoaded", () => {
1010
});
1111

1212
/**
13-
* @typedef {Object} TextRecognitionResult
13+
* @typedef {object} TextRecognitionResult
1414
* @property {number} confidence
1515
* @property {string} string
1616
* @property {DOMQuad} quad
@@ -19,8 +19,11 @@ window.addEventListener("DOMContentLoaded", () => {
1919
class TextRecognitionModal {
2020
/**
2121
* @param {Promise<TextRecognitionResult[]>} resultsPromise
22-
* @param {() => {}} resizeVertically
23-
* @param {(url: string, where: string, params: Object) => {}} openLinkIn
22+
* @param {Function} resizeVertically
23+
* @param {object} [openLinkIn]
24+
* @param {string} openLinkIn.url
25+
* @param {string} openLinkIn.where
26+
* @param {object} openLinkIn.params
2427
*/
2528
constructor(resultsPromise, resizeVertically, openLinkIn) {
2629
/** @type {HTMLElement} */
@@ -114,6 +117,7 @@ class TextRecognitionModal {
114117

115118
/**
116119
* After the results are shown, measure how long a user interacts with the modal.
120+
*
117121
* @param {number} textLength
118122
*/
119123
static recordTextLengthTelemetry(textLength) {
@@ -241,7 +245,7 @@ class TextRecognitionModal {
241245
/**
242246
* A two dimensional vector.
243247
*
244-
* @typedef {[number, number]} Vec2
248+
* @typedef {number[]} Vec2
245249
*/
246250

247251
/**
@@ -357,7 +361,7 @@ function densityCluster(points, distance, minPoints) {
357361
/**
358362
* @param {Vec2[]} points
359363
* @param {number} distance
360-
* @param {number} index,
364+
* @param {number} index
361365
* @returns {Index[]}
362366
*/
363367
function getNeighborsWithinDistance(points, distance, index) {

0 commit comments

Comments
 (0)