Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: pkg/compiler/lib/compiler.dart

Issue 2482923002: Use `Function` as function type syntax.
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/compiler.dart
diff --git a/pkg/compiler/lib/compiler.dart b/pkg/compiler/lib/compiler.dart
index e0306730f4457d379fd51d524b8ff9b73ce953a1..d5306fdec015be026c6bec1a34b46e973986043f 100644
--- a/pkg/compiler/lib/compiler.dart
+++ b/pkg/compiler/lib/compiler.dart
@@ -29,10 +29,10 @@ import 'src/options.dart' show CompilerOptions;
* expected to hold a zero element at the last position. If this is not the
* case, the entire data structure is copied before scanning.
*/
-typedef Future/*<String | List<int>>*/ CompilerInputProvider(Uri uri);
+typedef CompilerInputProvider = Future/*<String | List<int>>*/ Function(Uri);
/// Deprecated, please use [CompilerInputProvider] instead.
-typedef Future<String> ReadStringFromUri(Uri uri);
+typedef ReadStringFromUri = Future<String> Function(Uri);
/**
* Returns an [EventSink] that will serve as compiler output for the given
@@ -54,7 +54,7 @@ typedef Future<String> ReadStringFromUri(Uri uri);
* As more features are added to the compiler, new names and
* extensions may be introduced.
*/
-typedef EventSink<String> CompilerOutputProvider(String name, String extension);
+typedef CompilerOutputProvider = EventSink<String> Function(String name, String extension);
/**
* Invoked by the compiler to report diagnostics. If [uri] is
@@ -66,14 +66,14 @@ typedef EventSink<String> CompilerOutputProvider(String name, String extension);
* diagnostic message, and [kind] indicates indicates what kind of
* diagnostic it is.
*/
-typedef void DiagnosticHandler(
- Uri uri, int begin, int end, String message, Diagnostic kind);
+typedef DiagnosticHandler =
+ void Function(Uri, int begin, int end, String message, Diagnostic kind);
/**
* Provides a package lookup mechanism in the case that no package root or
* package resolution configuration file are explicitly specified.
*/
-typedef Future<Packages> PackagesDiscoveryProvider(Uri uri);
+typedef PackagesDiscoveryProvider = Future<Packages> Function(Uri);
/// Information resulting from the compilation.
class CompilationResult {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698