Skip to content

deepNullable ignores z.record's values #569

@KazimirPodolski

Description

@KazimirPodolski

https://codesandbox.io/p/sandbox/j7dkym

Doing zx.deepNullable(z.object({r: z.record(...)})) only makes the whole record nullable and ignores internals. Keys are not nullable indeed, but what about values? IMO it should make values nullable too, and other deep... methods should also apply to values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions