Skip to content

Commit dda53e8

Browse files
committed
more strong mode fixes
1 parent 91e0872 commit dda53e8

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

.analysis_options

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
analyzer:
2-
# strong-mode: true
2+
strong-mode: true

example/demo_dart_results.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ <h1 class="page-title">DDC compilation report for example/demo.dart</h1>
175175
</div>
176176
</div>
177177
<footer class="footer">
178-
example/demo.dart • DDC version 0.1.17
178+
example/demo.dart • DDC version 0.1.22
179179
</footer>
180180
</div>
181181
</body>

lib/atom.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ abstract class AtomPackage {
112112

113113
Future<Map<String, dynamic>> loadPackageJson() {
114114
return HttpRequest.getString('atom://${id}/package.json').then((String str) {
115-
return JSON.decode(str);
116-
}) as Future<Map>;
115+
return JSON.decode(str) as Map<String, dynamic>;
116+
});
117117
}
118118

119119
Future<String> getPackageVersion() {
120-
return loadPackageJson().then((Map map) => map['version']) as Future<String>;
120+
return loadPackageJson().then((Map map) => map['version']);
121121
}
122122

123123
// /// Register a method for a service callback (`consumedServices`).

lib/atom_utils.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,19 @@ Future<String> which(String execName, {bool isBatchScript: false}) {
8585
result = result.trim();
8686
if (result.contains('\n')) result = result.split('\n').first;
8787
return result;
88-
}) as Future<String>;
88+
});
8989
} else if (isWindows) {
9090
String ext = isBatchScript ? 'bat' : 'exe';
9191
return exec('where', ['${execName}.${ext}']).then((String result) {
9292
result = result.trim();
9393
if (result.contains('\n')) result = result.split('\n').first;
9494
return result;
95-
}) as Future<String>;
95+
});
9696
} else {
9797
return exec('which', [execName]).then((String result) {
9898
result = result.trim();
9999
if (result.contains('\n')) result = result.split('\n').first;
100100
return result;
101-
}) as Future<String>;
101+
});
102102
}
103103
}

lib/node/process.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Future<String> exec(String command, [List<String> args, Map<String, String> env]
4545
return runner.execSimple().then((ProcessResult result) {
4646
if (result.exit == 0) return result.stdout;
4747
throw result.exit;
48-
}) as Future<String>;
48+
});
4949
}
5050

5151
/// Execute the given command synchronously and return the stdout. If the
@@ -118,7 +118,7 @@ class ProcessRunner {
118118

119119
return execStreaming().then((code) {
120120
return new ProcessResult(code, stdout.toString(), stderr.toString());
121-
}) as Future<ProcessResult>;
121+
});
122122
}
123123

124124
Future<int> execStreaming() {

0 commit comments

Comments
 (0)