Closed isstuev closed 2 months ago
https://github.com/tatethurston/nextjs-routes/blob/main/packages/nextjs-routes/src/__snapshots__/core.test.ts.snap#L1484
should it be dynamic with type { "segments": string[] } instead of static?
Yes you’re right that it shouldn’t be static but rather:
DynamicRoute<"/api/[...segments]", { "segments"?: string[] | undefined }>
Happy to accept a PR if you’re up for it.
https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes#optional-catch-all-segments
https://github.com/tatethurston/nextjs-routes/blob/main/packages/nextjs-routes/src/__snapshots__/core.test.ts.snap#L1484
should it be dynamic with type { "segments": string[] } instead of static?