Closed PriFefis closed 2 years ago
For v5, did you install 5.0.0-5
?
For v4.7, the library has no TS declarations at that point in time so you have to add it to your own .d.ts file, even if your own declarations add no types.
This can be as simple as creating a module.d.ts
(this can be
Inside module.d.ts
add
declare module "@tmcw/togeojson"
Hi! It looks like you're using a very old version of TypeScript - generators became generic in 2019 with the 3.6 release. I'd recommend upgrading TypeScript, which should resolve the issue.
Closing - would recommend upgrading TypeScript to use 5.x
I tried to use v >= 5, however this error occurs:
ERROR in node_modules/@tmcw/togeojson/dist/index.d.ts(8,42): error TS2315: Type 'Generator' is not generic. node_modules/@tmcw/togeojson/dist/index.d.ts(27,42): error TS2315: Type 'Generator' is not generic. node_modules/@tmcw/togeojson/dist/index.d.ts(82,42): error TS2315: Type 'Generator' is not generic.
When I used version 4.7, I found the following errors:
But I can't install in that directory. Can you help me, please?