Skip to content

Commit

Permalink
Add params for jsDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
aswin-s committed Nov 1, 2023
1 parent c66bc8c commit f2c1022
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit f2c1022

Please sign in to comment.