5 ms·
I'd be interested to know how many DefinitelyTyped contributors agree with the "usually" part. My impression is that problems specifying types for existing libr
by brlewis 9y ago
I'd be interested to know how many DefinitelyTyped contributors agree with the "usually" part. My impression is that problems specifying types for existing libraries are the exception rather than the rule.
- boubiyeah 9y agoIt's true it's easier now that typescript has richer types (nullable, mapped, etc)
- aphexairlines 9y agoWell, there are over 10,000 occurrences of 'any' (which effectively gives up on type checking) in the DefinitelyTyped repository: https://github.com/DefinitelyTyped/DefinitelyTyped/search?q=any https://github.com/DefinitelyTyped/DefinitelyTyped/search?q=...
- shados 9y agoMany non-trivial libs are typed improperly, even when they can be done right. There's massive abuse of "any" type the moment anything gets semi-challenging. Also, a non-trivial amount of type definitions don't work in strict mode, which make things worse. Anything involving complicated higher order functions (like lodash/ramda's curry), or having a single method that can be used in various ways that don't fit well with TS' overloading mechanisms are often done wrong or poorly. Flow is a bit better at this, but the techniques it provides are not always well known, so the type definitions aren't that much better.