3 ms·
I think a lot of the complexities of the type system come from the fact that types have to describe complex behavior in a static way, while still being useful (
by bichiliad 6y ago
I think a lot of the complexities of the type system come from the fact that types have to describe complex behavior in a static way, while still being useful (you could type everything in your code as `any`[0], but that wouldn't be very useful). JavaScript is complex, so statically describing its behaviors is also complex. At the same time, most of the complex types are types you never have to see or use, unless you're the maintainer of a complex library and you want to provide really useful types.
[0]:https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/jquery/v1/index.d.ts#L380 https://github.com/DefinitelyTyped/DefinitelyTyped/blob/mast...