useRouter query
How do y'all handle typescript with nextjs's query params?
Currently I'm doing , but I'd rather not use the "as" keyword.
query.cartId is of type string | string[] | undefined
1 Reply
you can write a type guard, but honestly
as
is fine here