Short answer
There is no way to do what you're asking in pure css.
Why
:nth-of-type Can only be used against an element selector like so:
div:nth-of-type(2n+0) { margin-right: 0; }
Reference link.
Possible JS solution
You can try your luck with some jQuery though:
var $this;
$('[class^="type-"]').each(function (){
$this = $(this);
if ( $this.attr('class') !== $this.next().attr('class') )
$this.addClass('last');
});
Then use .type-2.last to access your "last row of type".
Demo
Heres a demo.