ziggy
ziggy copied to clipboard
TypeScript: `Module ... has no exported member Ziggy`
Ziggy version
2.5.2
Laravel version
12
Description
I generate my routes and types. When I import the routes config in typescript the TS service throws an error:
Module "@/lib/ziggy" has no exported member Ziggy
It makes sense because the ziggy.d.ts doesn't export anything except export {}; (to make it a module).
Ziggy call and context
Not relevant
Ziggy configuration
Not relevant
Route definition
Not relevant
I think this PR #826 was created to fix this but there is a better solution here that doesn't require a name option: #829
What is your @/lib/ziggy file and what's in it? How are you importing it and where are you generating and storing Ziggy's actual script and the types file?