The type factory definition for a generic type with two type arguments.
typedef TypeFactory2 = Object? Function<A, B>(Object? Function<V>() f);