You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.[Excessive properties in endpoint output](#excessive-properties-in-endpoint-output)
62
63
9.[Your input to my output](#your-input-to-my-output)
63
64
64
65
See also [Changelog](CHANGELOG.md) and [automated migration](https://www.npmjs.com/package/@express-zod-api/migration).
Consider using the recommended `tsconfig.json` base for your project according to your Node.js version,
183
+
for example [the base for Node.js 20+](https://github.com/tsconfig/bases/blob/main/bases/node20.json).
179
184
Ensure having the following options in your `tsconfig.json` file in order to make it work as expected:
180
185
181
186
```json
@@ -187,6 +192,8 @@ Ensure having the following options in your `tsconfig.json` file in order to mak
187
192
}
188
193
```
189
194
195
+
See also how `moduleResoultion` may cause [Zod 4 schema assignment error](#zod-4-schema-assignment-error);
196
+
190
197
## Set up config
191
198
192
199
Create a minimal configuration. Find out all configurable options
@@ -1378,6 +1385,18 @@ framework, [Zod Sockets](https://github.com/RobinTail/zod-sockets), which has si
1378
1385
There are some well-known issues and limitations, or third party bugs that cannot be fixed in the usual way, but you
1379
1386
should be aware of them.
1380
1387
1388
+
## Zod 4 schema assignment error
1389
+
1390
+
When using `zod@^4` and doing `import { z } from "zod/v4"` you may encounter the following error:
1391
+
1392
+
```text
1393
+
TS2739: ZodObject<...> is missing the following properties from ZodType<...>: example, deprecated.
1394
+
```
1395
+
1396
+
In this case make sure the `moduleResolution` in your `tsconfig.json` is either `node16`, `nodenext` or `bundle`.
1397
+
Consider the [recommended tsconfig base, Node 20+](https://github.com/tsconfig/bases/blob/main/bases/node20.json).
1398
+
Otherwise, keep importing `from "zod/v4"` or consider upgrading the framework to v25.
1399
+
1381
1400
## Excessive properties in endpoint output
1382
1401
1383
1402
The schema validator removes excessive properties by default. However, Typescript
0 commit comments