Skip to content

Commit 81a89f5

Browse files
authoredJul 31, 2023
Update nullish documentation to correct chaining order (#2457)
This follows on from 0c0e495 to keep the docs in sync.
1 parent 6aab901 commit 81a89f5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,7 @@ A convenience method that returns a "nullish" version of a schema. Nullish schem
23612361
const nullishString = z.string().nullish(); // string | null | undefined
23622362

23632363
// equivalent to
2364-
z.string().optional().nullable();
2364+
z.string().nullable().optional();
23652365
```
23662366

23672367
### `.array`

‎README_ZH.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ z.nullable(z.string());
16231623
const nullishString = z.string().nullish(); // string | null | undefined
16241624

16251625
// equivalent to
1626-
z.string().optional().nullable();
1626+
z.string().nullable().optional();
16271627
```
16281628

16291629
### `.array`

‎deno/lib/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2358,7 +2358,7 @@ A convenience method that returns a "nullish" version of a schema. Nullish schem
23582358
const nullishString = z.string().nullish(); // string | null | undefined
23592359

23602360
// equivalent to
2361-
z.string().optional().nullable();
2361+
z.string().nullable().optional();
23622362
```
23632363

23642364
### `.array`

0 commit comments

Comments
 (0)
Please sign in to comment.