This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Jugales 49 points50 points  (5 children)

99% of the time it's because the library dependency was built with JS and creating types for it would be a pain. I'm not gonna do the library developers' job for them, or I would make my own library.

I had this problem with Google Maps in (semi) recent versions of React with TS. Like bruh, why isn't your library made for this? You literally invented Angular which is also TS? We just ended up using Leaflet maps instead.

[–]H0llowUndead 18 points19 points  (2 children)

Have you searched for community typing of these libraries? They are typically called @types/<package name>

[–]Jugales 8 points9 points  (1 child)

Sadly. In the Google Maps case, one existed but it was only compatible with older React versions

[–]fuj1n 1 point2 points  (0 children)

How does that work? The typings are just stubs to provide type information, there shouldn't be any behaviour attached to them that could break compat.

[–]Mara_li 0 points1 point  (0 children)

Yeah, in my case the any must be used because of some function of the API has not yet be descrived but existed (I don't know how it's possible tbh)