Skip to content

Commit

Permalink
Comment tweaks describing validation/scoring types
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremywiebe committed Nov 20, 2024
1 parent 718fc62 commit 6109412
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/perseus/src/validation.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
* entered. This is referred to as the 'guess' in some older parts of Perseus.
*
* `Perseus<Widget>ValidationData`: the data needed to do validation of the
* user input. Validation is the checks we can do both on the client-side,
* before submitting user input for scoring, and on the server-side when we
* score it. As such, it cannot contain any of the sensitive scoring data
* that would reveal the answer.
* user input. Validation refers to the different checks that we can do both on
* the client-side (before submitting user input for scoring) and on the
* server-side (when we score it). As such, it cannot contain any of the
* sensitive scoring data that would reveal the answer.
*
* `Perseus<Widget>ScoringData` (nee `Perseus<Widget>Rubric`): the data needed
* to score the user input. By convention, this type is defined as the set of
Expand All @@ -22,7 +22,8 @@
* For example:
* ```
* type Perseus<Widget>ScoringData = {
* correct: string;
* correct: string; // Used _only_ for scoring
* size: number; // Used _only_ for scoring
* } & Perseus<Widget>ValidationData;
* ```
*/
Expand Down

0 comments on commit 6109412

Please sign in to comment.