The TypeScript type system is obscenely complicated because it has to be able to type almost any weird pattern people used when there was no type system.
Most dynamically typed languages are adding type systems right now, and they all face the choice between rewriting/wrapping the whole ecosystem or build a very complex and ultimately unergonomic type system.