From ed2089ee95a2f3a9d9f7d26d0162ec06166b98f0 Mon Sep 17 00:00:00 2001 From: Nick Campbell Date: Wed, 24 May 2023 11:18:11 +0100 Subject: [PATCH] Update nullish documentation to correct chaining order This follows on from 0c0e49517e4dfa to keep the docs in sync. --- README.md | 2 +- README_ZH.md | 2 +- deno/lib/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4057cf424..32a56cfad 100644 --- a/README.md +++ b/README.md @@ -2338,7 +2338,7 @@ A convenience method that returns a "nullish" version of a schema. Nullish schem const nullishString = z.string().nullish(); // string | null | undefined // equivalent to -z.string().optional().nullable(); +z.string().nullable().optional(); ``` ### `.array` diff --git a/README_ZH.md b/README_ZH.md index ef86a460d..b7edf69a6 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -1617,7 +1617,7 @@ z.nullable(z.string()); const nullishString = z.string().nullish(); // string | null | undefined // equivalent to -z.string().optional().nullable(); +z.string().nullable().optional(); ``` ### `.array` diff --git a/deno/lib/README.md b/deno/lib/README.md index 4057cf424..32a56cfad 100644 --- a/deno/lib/README.md +++ b/deno/lib/README.md @@ -2338,7 +2338,7 @@ A convenience method that returns a "nullish" version of a schema. Nullish schem const nullishString = z.string().nullish(); // string | null | undefined // equivalent to -z.string().optional().nullable(); +z.string().nullable().optional(); ``` ### `.array`