Skip to content

Instantly share code, notes, and snippets.

@csells
Created May 19, 2021 03:06
Show Gist options
  • Select an option

  • Save csells/453ee4bae39a4ead5ed147bb3cc2f379 to your computer and use it in GitHub Desktop.

Select an option

Save csells/453ee4bae39a4ead5ed147bb3cc2f379 to your computer and use it in GitHub Desktop.
// Type alias for functions (existing)
typedef ValueChanged<T> = void Function(T value);
// Type alias for classes (new!)
typedef StringList = List<String>;
// Rename classes in a non-breaking way (new!)
@Deprecated("Use NewClassName instead")
typedef OldClassName<T> = NewClassName<T>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment