Support writing needed extension types

It's still a single extension, though. It could be confusing to have two different functions which generate one extension.