I want to define like this:
public var reloadFRCsNeedToPerformWhenFail = [()->()]()
but I get an error
I want to define like this:
public var reloadFRCsNeedToPerformWhenFail = [()->()]()
but I get an error
Like this:
public var reloadFRCsNeedToPerformWhenFail : [()->()] = []
If you use a type alias to make ()->()
a type, you can do it your way:
public typealias VoidVoid = ()->()
public var reloadFRCsNeedToPerformWhenFail = [VoidVoid]()
Or, forego the []
shortcut notation and use the full generic:
public var reloadFRCsNeedToPerformWhenFail = Array<()->()>()