In this article, we look at some of the more advanced features of TypeScript, like union types, conditional types, template literal types, and generics. We want to formalize the most dynamic JavaScript behavior in a way that we can catch most bugs before they happen.
https://smashingmagazine.com/2021/01/dynamic-static-typing-typescript/