Doesn't TypeScript get compiled into JavaScript? I thought TSC actually does a compilation, hence the name, TypeScriptCompiler? But anyway, this also exists for PHP. Psalm (https://psalm.dev/) or PHPStan (https://github.com/phpstan/phpstan) both offer static type checking.