From 6733567f91cc2ed9ff400664966b9a821b452939 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Thu, 21 Jun 2018 16:08:04 -0700 Subject: [PATCH] Fix some more Dart 2 runtime type issues --- lib/src/io/node.dart | 4 ++-- lib/src/node.dart | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/src/io/node.dart b/lib/src/io/node.dart index afcae3a3..120dde3d 100644 --- a/lib/src/io/node.dart +++ b/lib/src/io/node.dart @@ -21,7 +21,7 @@ class _FS { external void mkdirSync(String path); external _Stat statSync(String path); external void unlinkSync(String path); - external List readdirSync(String path); + external List readdirSync(String path); } @JS() @@ -191,7 +191,7 @@ void ensureDir(String path) { Iterable listDir(String path) { Iterable 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]; }); diff --git a/lib/src/node.dart b/lib/src/node.dart index 189f73c8..c377888e 100644 --- a/lib/src/node.dart +++ b/lib/src/node.dart @@ -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 =