typealias for empty closures
suggest changetypealias Handler = () -> Void
() and Void are the same return type, so () -> () means the same thing. Either form names a function that takes no parameters and returns nothing. The same name cannot be declared twice.
Here is a usage example. func is a keyword, so the variable needs another name:
var handler: Handler?
handler = {}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents