summaryrefslogtreecommitdiff
path: root/ext/js/dom/document-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2022-05-20 10:28:38 -0400
committerGitHub <noreply@github.com>2022-05-20 10:28:38 -0400
commit31e20c889e467aa4ba64b0b5baf602adc1359371 (patch)
treea033db935a817b2d407ec20843176610a87a6e16 /ext/js/dom/document-util.js
parentae0ad227c0fd293609a21e5cc1d2a4b85fe7c520 (diff)
ESlint JSdoc (#2148)
* Install eslint-plugin-jsdoc * Initial rules setup * Update lists * Use @returns rather than @return * Remove error throwing code which is never executed * Fix issues relating to @throws * General error fixes * Update Display type documentation * Various doc fixes * Fix invalid tuple syntax * Doc updates * Remove unused * Doc updates * Enable jsdoc/require-returns * Update rules * Update remaining rules
Diffstat (limited to 'ext/js/dom/document-util.js')
-rw-r--r--ext/js/dom/document-util.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/js/dom/document-util.js b/ext/js/dom/document-util.js
index 10d91551..f5cf194b 100644
--- a/ext/js/dom/document-util.js
+++ b/ext/js/dom/document-util.js
@@ -68,27 +68,27 @@ class DocumentUtil {
/**
* Extract a sentence from a document.
- * @param source The text source object, either `TextSourceRange` or `TextSourceElement`.
- * @param layoutAwareScan Whether or not layout-aware scan mode should be used.
- * @param extent The length of the sentence to extract.
- * @param terminateAtNewlines Whether or not a sentence should be terminated at newline characters.
- * @param terminatorMap A mapping of characters that terminate a sentence.
+ * @param {TextSourceRange|TextSourceElement} source The text source object, either `TextSourceRange` or `TextSourceElement`.
+ * @param {boolean} layoutAwareScan Whether or not layout-aware scan mode should be used.
+ * @param {number} extent The length of the sentence to extract.
+ * @param {boolean} terminateAtNewlines Whether or not a sentence should be terminated at newline characters.
+ * @param {Map<string, *[]>} terminatorMap A mapping of characters that terminate a sentence.
* Format:
* ```js
* new Map([ [character: string, [includeCharacterAtStart: boolean, includeCharacterAtEnd: boolean]], ... ])
* ```
- * @param forwardQuoteMap A mapping of quote characters that delimit a sentence.
+ * @param {Map<string, *[]>} forwardQuoteMap A mapping of quote characters that delimit a sentence.
* Format:
* ```js
* new Map([ [character: string, [otherCharacter: string, includeCharacterAtStart: boolean]], ... ])
* ```
- * @param backwardQuoteMap A mapping of quote characters that delimit a sentence,
+ * @param {Map<string, *[]>} backwardQuoteMap A mapping of quote characters that delimit a sentence,
* which is the inverse of forwardQuoteMap.
* Format:
* ```js
* new Map([ [character: string, [otherCharacter: string, includeCharacterAtEnd: boolean]], ... ])
* ```
- * @returns The sentence and the offset to the original source: `{sentence: string, offset: integer}`.
+ * @returns {{sentence: string, offset: number}} The sentence and the offset to the original source.
*/
extractSentence(source, layoutAwareScan, extent, terminateAtNewlines, terminatorMap, forwardQuoteMap, backwardQuoteMap) {
// Scan text