Closed aqos156 closed 1 month ago
Describe the bug When usePathname is used within the codebase the return type RouteLiteral is being resolved to any.
usePathname
RouteLiteral
any
However, everywhere else (that I have checked) the RouteLiteral is being resolved correctly.
Workaround
I have disabled generating types in production builds and manually removed the usePathname type override from nextjs-routes.d.ts.
nextjs-routes.d.ts
Context (please complete the following information):
npx nextjs-routes
@aqos156 Thanks for reporting this bug -- that was quite the oversight on my end. I've updated the specs to catch this and published v2.2.3 with the fix.
Describe the bug When
usePathname
is used within the codebase the return typeRouteLiteral
is being resolved toany
.However, everywhere else (that I have checked) the
RouteLiteral
is being resolved correctly.Workaround
I have disabled generating types in production builds and manually removed the
usePathname
type override fromnextjs-routes.d.ts
.Context (please complete the following information):
pages directory,app directory,or both?or the CLI (npx nextjs-routes
)?