summaryrefslogtreecommitdiff
path: root/ext/js/general/regex-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/general/regex-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/general/regex-util.js')
-rw-r--r--ext/js/general/regex-util.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/js/general/regex-util.js b/ext/js/general/regex-util.js
index d74a2f1e..6fa1a220 100644
--- a/ext/js/general/regex-util.js
+++ b/ext/js/general/regex-util.js
@@ -22,12 +22,12 @@ class RegexUtil {
/**
* Applies string.replace using a regular expression and replacement string as arguments.
* A source map of the changes is also maintained.
- * @param text A string of the text to replace.
- * @param sourceMap An instance of `TextSourceMap` which corresponds to `text`.
- * @param pattern A regular expression to use as the replacement.
- * @param replacement A replacement string that follows the format of the standard
+ * @param {string} text A string of the text to replace.
+ * @param {TextSourceMap} sourceMap An instance of `TextSourceMap` which corresponds to `text`.
+ * @param {RegExp} pattern A regular expression to use as the replacement.
+ * @param {string} replacement A replacement string that follows the format of the standard
* JavaScript regular expression replacement string.
- * @return A new string with the pattern replacements applied and the source map updated.
+ * @returns {string} A new string with the pattern replacements applied and the source map updated.
*/
static applyTextReplacement(text, sourceMap, pattern, replacement) {
const isGlobal = pattern.global;
@@ -57,10 +57,10 @@ class RegexUtil {
/**
* Applies the replacement string for a given regular expression match.
- * @param replacement The replacement string that follows the format of the standard
+ * @param {string} replacement The replacement string that follows the format of the standard
* JavaScript regular expression replacement string.
- * @param match A match object returned from RegExp.match.
- * @return A new string with the pattern replacement applied.
+ * @param {object} match A match object returned from RegExp.match.
+ * @returns {string} A new string with the pattern replacement applied.
*/
static applyMatchReplacement(replacement, match) {
const pattern = this._matchReplacementPattern;