FriendsOfSymfony / FOSJsRoutingBundle

A pretty nice way to expose your Symfony routing to client applications.
1.48k stars 261 forks source link

Cannot use router in a Typescript Environment #435

Open milanteo opened 2 years ago

milanteo commented 2 years ago

I'm currently trying to use this package in a Symfony project using Webpack Encore, I'm currently working with Vue 3 and Typescript and trying to implement it as show in this PR PR

but after compiling i get those errors

image

Some help would be appreciated to know if I'm doing something wrong Thank you in advance

Ludovicmanga commented 2 years ago

Hey @milanteo. For 'tsd', I used 'npm install tsd' like explained here : https://github.com/SamVerschueren/tsd For the second error, I added "esModuleInterop": true, in "compilerOptions" in my tsconfig.json

zelding commented 1 year ago

Strange that the tsd is not a requirement, and the esModuleInterop option didn't solve the second error for me.

Anyone has more guesses ?