Closures and Type Alias
suggest changeA closure can be defined with a typealias
. This provides a convenient type placeholder if the same closure signature is used in multiple places. For example, common network request callbacks or user interface event handlers make great candidates for being “named” with a type alias.
ClosureType
You can then define a function using the typealias:
ClosureType
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents