Skip to content

Commit

Permalink
Merge pull request #2723 from jeremykohn/api-typos
Browse files Browse the repository at this point in the history
Fix typos in API.md ('Names links' -> 'Named links', 'unknownMisees' -> 'unknownMisses')
  • Loading branch information
hueniverse committed Jan 12, 2022
2 parents 2cde8a3 + a10ea85 commit 7e5aebf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,7 @@ Supports the methods of the [`any()`](#any) type.

When links are combined with `any.when()` rules, the rules are applied after the link is resolved to the linked schema.

Names links are recommended for most use cases as they are easy to reason and understand, and when mistakes are made, they simply error with invalid link message. Relative links are often hard to follow, especially when they are nested in array or alternatives rules. Absolute links are useful only when the schema is never reused inside another schema as the root is the run-time root of the schema being validated, not the current schema root.
Named links are recommended for most use cases as they are easy to reason and understand, and when mistakes are made, they simply error with invalid link message. Relative links are often hard to follow, especially when they are nested in array or alternatives rules. Absolute links are useful only when the schema is never reused inside another schema as the root is the run-time root of the schema being validated, not the current schema root.

Note that named links must be found in a direct ancestor of the link. The names are searched by iterating over the chain of schemas from the current schema to the root. To reach an uncle or cousin, you must use the name of a common ancestor such as a grandparent and then walk down the tree.

Expand Down Expand Up @@ -3582,7 +3582,7 @@ Additional local context properties:
```ts
{
knownMisses: Array<string>, // Labels of all the missing values
unknownMisees: number // Count of missing values that didn't have a label
unknownMisses: number // Count of missing values that didn't have a label
}
```

Expand All @@ -3604,7 +3604,7 @@ Some values were expected to be present in the array and are missing. This error
Additional local context properties:
```ts
{
unknownMisees: number // Count of missing values that didn't have a label
unknownMisses: number // Count of missing values that didn't have a label
}
```

Expand Down

0 comments on commit 7e5aebf

Please sign in to comment.