From f2c1022794bd7d1bda6b80ce2297493e7c1b0386 Mon Sep 17 00:00:00 2001 From: Aswin S Date: Wed, 1 Nov 2023 20:39:47 +0530 Subject: [PATCH] Add params for jsDoc --- .../ReportActionCompose/ComposerWithSuggestions.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js index efc0b88fe5c2..b306676d476a 100644 --- a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js +++ b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js @@ -198,7 +198,14 @@ function ComposerWithSuggestions({ }, [textInputRef]); /** - * Find diff between text changes in composer + * Find the newly added characters between the previous text and the new text based on the selection. + * + * @param {string} prevText - The previous text. + * @param {string} newText - The new text. + * @returns {object} An object containing information about the newly added characters. + * @property {number} startIndex - The start index of the newly added characters in the new text. + * @property {number} endIndex - The end index of the newly added characters in the new text. + * @property {string} diff - The newly added characters. */ const findNewlyAddedChars = useCallback( (prevText, newText) => {