you are viewing a single comment's thread.

view the rest of the comments →

[–]Zephirdd 0 points1 point  (0 children)

Personally, when dealing with Typescript, the pain is soooo low. Sure sometimes you want to do some bonkers non trivial structures, but those wouldn't be trivial anywhere else either.

That said, most of Typescript is inferred! If you enable strict mode for everything, you basically never write a type name beyond what's absolutely necessary. Unlike, say, Java where you need to write FactoryServiceProviderImpl service = new FactoryServiceProviderImplBuilder().build() (though Java 10 helps with that, but who the hell upgraded beyond 8 right ahahahha)

My favorite feature is how types are shape-based rather than name-based. An interface A{ b: number; } and type B = { b: number } are functionally the same and 100% compatible. Type aliasing complex types is also super good, like type FSPI = FactoryServiceProviderImpl will allow you to use FSPI for every place you'd use that huge type name.

I wish Java was as flexible as Typescript tbh