Introduced TypeRule. TypeResolver supports arbitrary functions.