(Replying to PARENT post)
Yes, TS and typecasting can live well together. However, once you combine sensible naming by type and typecasting together, the benefits of TS fade. Then one has to ask: are the remaining benefits worth the expense of running a full TS transpiling infrastructure? In my case, the answer is a definitive 'no'. Typecasting along with Webstorm introspection virtually eliminate may of the issues that TS was designed to solve.
๐คdepmann๐5y๐ผ0๐จ๏ธ0
(Replying to PARENT post)
There's a library called runtypes (https://github.com/pelotom/runtypes) that integrates TS and Typecasting quite nicely
๐คwilliamdclt๐5y๐ผ0๐จ๏ธ0
(Replying to PARENT post)
The typecast approach presented in the article can be combined with TS to provide runtime type safety; They are not entirely opposite/alternative approaches but complementary.