Skip to content

Commit

Permalink
Link to example for renameFieldFrom in readme
Browse files Browse the repository at this point in the history
Previously, it linked to the `taggedUnion` documentation, which doesn’t
say anything about `renameFieldFrom`, except linking to the “Renaming
union field” example. Now we link to that example directly, which is
more helpful.
  • Loading branch information
lydell committed Jan 4, 2024
1 parent 5479aa7 commit 6226889
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ Used with [taggedUnion](#taggedunion), once for each variant of the union.

`tag("MyTag", { renameTagFrom: "my_tag" })` returns a `Field` with a codec that requires the input `"my_tag"` but returns `"MyTag"`.

For `renameFieldFrom`, see [taggedUnion](#taggedunion).
For `renameFieldFrom`, see the [Renaming union field](examples/renaming-union-field.test.ts) example.

You will typically use string tags for your tagged unions, but other primitive types such as `boolean` and `number` are supported too.

Expand Down

0 comments on commit 6226889

Please sign in to comment.