When you run php artisan ziggy:generate --types, two files are generated:
resources/js/ziggy.js, which exports the Ziggy object.
resources/js/ziggy.d.ts, which defines the RouteList interface in the ziggy-js namespace.
Now in my app.ts file on the line where I import Ziggy (import { Ziggy } from './ziggy';) it says TS2305: Module './ziggy' has no exported member Ziggy. This is—for as far as I understand—because ziggy.d.ts's definitions differ from the contents of ziggy.js.
Ziggy version
1.8.1
Laravel version
10.39.0
Description
When you run
php artisan ziggy:generate --types
, two files are generated:resources/js/ziggy.js
, which exports theZiggy
object.resources/js/ziggy.d.ts
, which defines theRouteList
interface in theziggy-js
namespace.Now in my
app.ts
file on the line where I import Ziggy (import { Ziggy } from './ziggy';
) it saysTS2305: Module './ziggy' has no exported member Ziggy
. This is—for as far as I understand—becauseziggy.d.ts
's definitions differ from the contents ofziggy.js
.Ziggy call and context
Ziggy configuration
Route definition