Skip to content

Instantly share code, notes, and snippets.

@fitomad
Created August 24, 2016 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitomad/2bb45df1feeb2475d7794abb4184674b to your computer and use it in GitHub Desktop.
Save fitomad/2bb45df1feeb2475d7794abb4184674b to your computer and use it in GitHub Desktop.
//
// Antes. Un callback por cada tipo devuelto
//
typedef ResultVenueCompletionHandler = (result: Venue) -> (Void)
typedef ResultHotelCompletionHandler = (result: Hotel) -> (Void)
//
// Ahora. Al poder ser definidos como genéricos con un tipo nos vale
//
typedef ResultCompletionHandler<T> = (T) -> (Void)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment