From c312e7a55114b913afcd85d92f2bf1006b8af246 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 15 Dec 2023 20:31:48 -0500 Subject: Fix usage of any (*) type in DocumentUtil (#361) --- ext/js/dom/document-util.js | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'ext/js/dom') diff --git a/ext/js/dom/document-util.js b/ext/js/dom/document-util.js index b2aa8f81..0153e74a 100644 --- a/ext/js/dom/document-util.js +++ b/ext/js/dom/document-util.js @@ -100,22 +100,9 @@ export class DocumentUtil { * @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} terminatorMap A mapping of characters that terminate a sentence. - * Format: - * ```js - * new Map([ [character: string, [includeCharacterAtStart: boolean, includeCharacterAtEnd: boolean]], ... ]) - * ``` - * @param {Map} forwardQuoteMap A mapping of quote characters that delimit a sentence. - * Format: - * ```js - * new Map([ [character: string, [otherCharacter: string, includeCharacterAtStart: boolean]], ... ]) - * ``` - * @param {Map} 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]], ... ]) - * ``` + * @param {import('text-scanner').SentenceTerminatorMap} terminatorMap A mapping of characters that terminate a sentence. + * @param {import('text-scanner').SentenceForwardQuoteMap} forwardQuoteMap A mapping of quote characters that delimit a sentence. + * @param {import('text-scanner').SentenceBackwardQuoteMap} backwardQuoteMap A mapping of quote characters that delimit a sentence, which is the inverse of forwardQuoteMap. * @returns {{text: string, offset: number}} The sentence and the offset to the original source. */ static extractSentence(source, layoutAwareScan, extent, terminateAtNewlines, terminatorMap, forwardQuoteMap, backwardQuoteMap) { -- cgit v1.2.3