Fix some more Dart 2 runtime type issues

This commit is contained in:
Natalie Weizenbaum 2018-06-21 16:08:04 -07:00
parent 1d176059f2
commit 6733567f91
2 changed files with 4 additions and 3 deletions

View File

@ -21,7 +21,7 @@ class _FS {
external void mkdirSync(String path);
external _Stat statSync(String path);
external void unlinkSync(String path);
external List<String> readdirSync(String path);
external List readdirSync(String path);
}
@JS()
@ -191,7 +191,7 @@ void ensureDir(String path) {
Iterable<String> listDir(String path) {
Iterable<String> list(String parent) =>
_fs.readdirSync(parent).expand((child) {
var path = p.join(parent, child);
var path = p.join(parent, child as String);
return dirExists(path) ? listDir(path) : [path];
});

View File

@ -38,7 +38,8 @@ typedef _Importer(String url, String prev, [void done(result)]);
/// export that runs the normal `main()`, which is called from `package/sass.js`
/// to run the executable when installed from npm.
void main() {
exports.run_ = allowInterop(executable.main);
exports.run_ =
allowInterop((args) => executable.main(new List.from(args as List)));
exports.render = allowInterop(_render);
exports.renderSync = allowInterop(_renderSync);
exports.info =