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

Unified Diff: pkg/analysis_server/lib/src/protocol.dart

Issue 300643002: Use type annotations everywhere in analysis_server/lib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rollback using 'dynamic' type Created 6 years, 7 months 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 | « pkg/analysis_server/lib/src/analysis_manager.dart ('k') | pkg/analysis_server/lib/src/socket_server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/protocol.dart
diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
index 33628b1e46090aa01d5ca75fbd65d249c307d5a5..21d8b08b6ae918573d44bb1a92f2e0b003e1ff24 100644
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ b/pkg/analysis_server/lib/src/protocol.dart
@@ -136,7 +136,7 @@ class Request {
* Return the value of the parameter with the given [name], or [defaultValue]
* if there is no such parameter associated with this request.
*/
- RequestDatum getParameter(String name, dynamic defaultValue) {
+ RequestDatum getParameter(String name, defaultValue) {
Object value = params[name];
if (value == null) {
return new RequestDatum(this, "default for $name", defaultValue);
@@ -243,7 +243,7 @@ class RequestDatum {
throw new RequestFailure(new Response.invalidParameter(request, path,
"be a map"));
}
- datum.forEach((String key, dynamic value) {
+ datum.forEach((String key, value) {
f(key, new RequestDatum(request, "$path.$key", value));
});
}
@@ -467,12 +467,12 @@ class Response {
*/
factory Response.fromJson(Map<String, Object> json) {
try {
- var id = json[Response.ID];
+ Object id = json[Response.ID];
if (id is! String) {
return null;
}
- var error = json[Response.ERROR];
- var result = json[Response.RESULT];
+ Object error = json[Response.ERROR];
+ Object result = json[Response.RESULT];
Response response;
if (error is Map) {
response = new Response(id, new RequestError.fromJson(error));
@@ -729,7 +729,7 @@ class Notification {
factory Notification.fromJson(Map<String, Object> json) {
try {
String event = json[Notification.EVENT];
- var params = json[Notification.PARAMS];
+ Object params = json[Notification.PARAMS];
Notification notification = new Notification(event);
if (params is Map) {
params.forEach((String key, Object value) {
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_manager.dart ('k') | pkg/analysis_server/lib/src/socket_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698