Russell blocks the contradiction in the Principles by the introduction of a theory of types. This is a simple theory of types, that only distinguishes between the types of various propositional functions (or, in its class-form, of classes).  Let us depart from Russell's own exposition of the theory of types in order to give a more rigorous and more modern version of the theory. This will make my presentations of the ramified theory of types and more modern versions of type theory easier.