Unify transformer constructor type signature

This allows us to remove a bunch of boilerplate code.