| Yeah. I learnt to use @ts-ignore but there are some religious people who judge quality of code by the coverage of how typed something is even if it is not necessarily benefiting. Example: one or two requests to an isolated rest API with some data. While I get the point of documenting the properties if you don't use all of them and might need to in future, most of the time - it's not necessary. I have seen some people include a type generator for this. or including complex generic mess. I myself am guilty of this one. A recent example comes to mind where I wanted to generate a multi dimensional array from an external api. Each entry in it would have specific first items and rest would be some complex typefoo. I spent half an hour on writing the type. The thing is it's an isolated code and there is no one other than me working on it. Plus, there is visible code doing transformation of the data to turn it into specific entries. It's just kind of not necessary and the type isn't readable either. [type<[...typeboo[][]]>, type<[...typemoo[][] ]>, ...typefoo[][]] Something like that with imported types from another file. I think it's easy to read types for someone coming into the project. I can hover over and see how it would look like if the case is not isolated. Another thing that makes typescript type system alluring is that it's like an entirely different language due to javascript being so dynamic. It's similar to writing coq or some proof theorem language to verify the code. In this case, it's more data structures or data itself. Maybe it's more similar to writing your own linter or subset of language by putting constraints through the type system [0]. I am not sure. 0] https://github.com/millsp/ts-toolbelt |
[0]: https://quicktype.io/