Update typedef syntax to use Function notation and turn on lint for old notation. (#18362)

Now that Dart 1 is turned off, reapplying my change to turn on the prefer_generic_function_type_aliases analysis option, and fix all the typedefs to Dart 2 preferred syntax.

Also eliminated the unused analysis_options_repo.yaml file and turned on public_member_api_docs in analysys_options.yaml.

No logic changes, just changing the typedef syntax for all typedefs, and updating analysis options.
This commit is contained in:
Greg Spencer
2018-06-11 15:51:45 -07:00
committed by GitHub
parent 3019ad976d
commit 6c56bb2420
130 changed files with 216 additions and 371 deletions

View File

@@ -43,7 +43,7 @@ enum LoggingLevel {
}
/// Signature of a function that logs a [LogMessage].
typedef void LoggingFunction(LogMessage log);
typedef LoggingFunction = void Function(LogMessage log);
/// The default logging function.
///

View File

@@ -20,7 +20,7 @@ final Logger _log = new Logger('DartVm');
/// Signature of an asynchronous function for astablishing a JSON RPC-2
/// connection to a [Uri].
typedef Future<json_rpc.Peer> RpcPeerConnectionFunction(Uri uri);
typedef RpcPeerConnectionFunction = Future<json_rpc.Peer> Function(Uri uri);
/// [DartVm] uses this function to connect to the Dart VM on Fuchsia.
///

View File

@@ -30,7 +30,7 @@ final Logger _log = new Logger('FuchsiaRemoteConnection');
/// Takes a remote `address`, the target device's port, and an optional
/// `interface` and `configFile`. The config file is used primarily for the
/// default SSH port forwarding configuration.
typedef Future<PortForwarder> PortForwardingFunction(
typedef PortForwardingFunction = Future<PortForwarder> Function(
String address, int remotePort,
[String interface, String configFile]);