IMO it's better to just use TypeScript anywhere that you'd normally use Perl. The type safety helps later on when you revisit old code plus I think it's more productive overall, having used Perl many times in the past.
Python has some semi-decent type hinting, these days. It's not so bad, it'll keep you out of most of the same trouble that TypeScript does.