UNPKG
next-typesafe-path
Version:
latest (0.0.5)
0.0.5
0.0.4
0.0.3
0.0.2
Type-safe path for Next.js
github.com/Uki884/next-typesafe-path
Uki884/next-typesafe-path
next-typesafe-path
/
dist
/
src
/
searchParams
/
types.d.ts
5 lines
(4 loc)
•
164 B
TypeScript
View Raw
1
2
3
4
5
import
{ z }
from
'zod'
;
export
type
InferSearchParams
<T
extends
z.
ZodType
> = { [K
in
keyof z.
infer
<T>
as
K
extends
string
? K :
never
]: z.
infer
<T>[K]; } & {};