Skip to content

Commit fc2a41c

Browse files
committed
chore: use namespace import for zod
1 parent 82880ed commit fc2a41c

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ npm install zod-parse-args zod
1919
## Example
2020

2121
```ts
22-
import { z } from "zod";
22+
import * as z from "zod";
2323
import { parseArgs } from "zod-parse-args";
2424

2525
const { name, times, loud } = parseArgs(
@@ -59,7 +59,7 @@ for (let i = 0; i < times; i++) {
5959
Use [`z.discriminatedUnion()`](https://zod.dev/api#discriminated-unions) to define subcommands:
6060

6161
```ts
62-
import { z } from "zod";
62+
import * as z from "zod";
6363
import { parseArgs } from "zod-parse-args";
6464

6565
const args = parseArgs(
@@ -120,7 +120,7 @@ Arrays, tuples, and key-value records map naturally to CLI conventions:
120120
Here's an example of a test runner that uses all three:
121121

122122
```ts
123-
import { z } from "zod";
123+
import * as z from "zod";
124124
import { parseArgs } from "zod-parse-args";
125125

126126
const args = parseArgs(
@@ -172,7 +172,7 @@ Control how fields map to CLI arguments with [`.meta()`](https://zod.dev/metadat
172172
All keys are optional. Here's an example using each one:
173173

174174
```ts
175-
import { z } from "zod";
175+
import * as z from "zod";
176176
import { parseArgs } from "zod-parse-args";
177177

178178
const args = parseArgs(

e2e/greet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { z } from "zod";
1+
import * as z from "zod";
22
import { parseArgs } from "zod-parse-args";
33

44
const { name, times, loud } = parseArgs(

src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
type RootSchema,
88
type ParseArgsOptions,
99
} from "./index.ts";
10-
import { z } from "zod";
10+
import * as z from "zod";
1111
import * as zodMini from "zod/mini";
1212

1313
const obj = z.object.bind(z);

0 commit comments

Comments
 (0)