Skip to content

Issue with using Zod v4 as a parser in v2.7.0 #1153

Description

@yWilliamLima

Context

What's your version of nuqs?

"nuqs": "2.7.0"

What framework are you using?

  • Next.js (app router)

Which version of your framework are you using?

"next": "15.5.4"
"zod": "4.1.11"

Description

There is an issue with using Zod v4 as a parser, where the problem started occurring in version 2.7.0. It was working fine in version 2.6.0.

Reproduction

Use any Zod schema as a parser in a useQueryState, example:

const [test, setTest] = useQueryState('test', z.string())

Error:

No overload matches this call.
  The last overload gave the following error.
    Type 'ZodString' has no properties in common with type 'Pick<UseQueryStateOptions<string>, keyof Options>'.

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