The more modern solution is to break the large codebases into self contained microservices. In which case dynamic typing scales indefinitely.
I've worked on dynamically typed codebases for a long time. Passing the wrong type is very rare. I mean how would the code pass the unit tests if it was passing the wrong type?