Let’s not get ahead of ourselves. Typescript has a decent type system, but it’s hardly state of the art. It’s impressive how they’ve managed to mostly corral JavaScript into something much more sane, but at the end of the day it still suffers greatly from the limitations of JavaScript. They’ve essentially retrofitted some type theory onto JavaScript to make it possible to express JavaScript nonsense in the type system, but there’s plenty of things that would have been designed differently had they been making something from scratch. Not to mention that the type system is unsound by design, which by itself puts it behind languages designed from the ground up to have sound type systems.
There’s many, many things missing from the type system, like higher-kinded types, type-driven deriving/codegen, generalized algebraic data types (aka GADTs), type families (and relatedly, associated types), existentially-quantified types, and much more.
Except we didn’t call all of that AI then, and it’s silly to call it AI now. In chess, they’re called “chess engines”. They are highly specialized tools for analyzing chess positions. In medical imaging, that’s called computer vision, which is a specific, well-studied field of computer science.
The problem with using the same meaningless term for everything is the precise issue you’re describing: associating specialized computer programs for solving specific tasks with the misapplication of the generative capabilities of LLMs to areas in which it has no business being applied.