spec for custom typecasters