Skip to content

Commit

Permalink
Update API reference of forward method on website
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-hiller committed Jul 2, 2024
1 parent 07cf66b commit 5c5aa81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions website/src/routes/api/(methods)/forward/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { properties } from './properties';
Forwards the issues of the passed validation action.

```ts
const Action = v.forward<TInput, TIssue>(action, pathList);
const Action = v.forward<TInput, TIssue>(action, pathKeys);
```

## Generics
Expand All @@ -25,11 +25,11 @@ const Action = v.forward<TInput, TIssue>(action, pathList);
## Parameters

- `action` <Property {...properties.action} />
- `pathList` <Property {...properties.pathList} />
- `pathKeys` <Property {...properties.pathKeys} />

### Explanation

`forward` allows you to forward the issues of the passed validation `action` via a `pathList` to a nested field of a schema.
`forward` allows you to forward the issues of the passed validation `action` via `pathKeys` to a nested field of a schema.

## Returns

Expand Down
10 changes: 6 additions & 4 deletions website/src/routes/api/(methods)/forward/properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ export const properties: Record<string, PropertyProps> = {
generics: ['string', 'unknown'],
},
{
type: 'array',
item: 'unknown',
type: 'custom',
name: 'ArrayLike',
generics: ['unknown'],
},
],
},
Expand Down Expand Up @@ -48,10 +49,11 @@ export const properties: Record<string, PropertyProps> = {
],
},
},
pathList: {
pathKeys: {
type: {
type: 'custom',
name: 'PathList',
name: 'PathKeys',
href: '../PathKeys/',
generics: [
{
type: 'custom',
Expand Down

0 comments on commit 5c5aa81

Please sign in to comment.