Register with Scope and Factory
bhushans opened this issue · 1 comments
bhushans commented
Hello,
I have a generic functions that used to use for registering the factory.
However, when I try to do it now, it starts throwing error
Cannot invoke 'register' with an argument list of type '(ComponentScope, factory: () throws -> T)'
Here is the function.
open func register(_ factory: () throws -> T) {
recordMethods(T.self as! CDVPlugin.Type)
container.register(DefaultScope, factory: factory)
}