From 6226889a6cad3eac95f0470623d948fafe99baab Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Thu, 4 Jan 2024 18:58:28 +0100 Subject: [PATCH] Link to example for `renameFieldFrom` in readme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 75f5cc7..5054b66 100644 --- a/README.md +++ b/README.md @@ -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.