The type theory Russell invented has little to do with type theory as used in programming languages other than the name. You could make a strong case that grammar as a type theory for human languages was an even earlier example of using types, but it's one that's just as meaningless to us.
The early history of type theory for programming languages comes from research into lambda calculus: