Closures and Type Alias

suggest change

A 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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents