zod: `nonNullable` method that disallows `null` and `undefined`, like typescript's `NonNullable`

It’s great to see that unwrap now exists! Thanks for adding it,

I had trouble finding unwrap, and the name isn’t intuitive to me. I worry I’ll have trouble finding it again in the future, since I don’t use zod very often.

What do you think of adding an alias for unwrap called nonNullable? It was the first thing that came to mind for me when I was searching for this feature since Typescript has a utility type called NonNullable.

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 6
  • Comments: 15 (1 by maintainers)

Most upvoted comments

I’m still interested.

I’m still interested in this.

Don’t close

I’m interested.