Registers a callback with the specified type.
The type of the callback.
A lambda function that returns an instance of the callback.