zod
zod copied to clipboard
deny unexpected keys @ `ZodObject`'s `.omit(mask)`,`.pick(mask)`,`.required(mask)` & `.partial(mask)` at compile time.
Hey 👋
ZodObject methods that receive a mask as input currently accept unexpected keys (keys that do not exist in object's shape) without any typescript errors. This can be safer.
Issue is also mentioned @ #1563.
This PR limits omit()/pick()/required()/partial() mask object to ZodObject's shape, introducing a welcome type-safety breaking change to zod.
It does so without affecting autocompletion.
Deploy Preview for guileless-rolypoly-866f8a ready!
| Name | Link |
|---|---|
| Latest commit | 1102a5dd1b3e35fcd3fd04680908b1cb1f8a8046 |
| Latest deploy log | https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/63e34f65edf8000008fd0bc7 |
| Deploy Preview | https://deploy-preview-1564--guileless-rolypoly-866f8a.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Love it, thanks!!!
Love the helper name change!