Skip to content

Commit

Permalink
Add validation function doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Myranae committed Nov 21, 2024
1 parent 5327ece commit 61de24e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/perseus/src/widgets/sorter/validate-sorter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import type {PerseusScore} from "../../types";
import type {PerseusSorterUserInput} from "../../validation.types";

/**
* Checks user input for the sorter widget to ensure that the user has made
* changes before attempting to score the widget.
* @param userInput
* @see 'scoreSorter' in 'packages/perseus/src/widgets/sorter/score-sorter.ts'
* for more details on how the sorter widget is scored.
*/
function validateSorter(
userInput: PerseusSorterUserInput,
): Extract<PerseusScore, {type: "invalid"}> | null {
Expand Down

0 comments on commit 61de24e

Please sign in to comment.