dart:js_util: add bool return type to instanceof and hasProperty
Change-Id: Ib3f52a42a25d3a14089a7aa7d74c206603eed80d
Reviewed-on: https://dart-review.googlesource.com/59280
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
diff --git a/sdk/lib/js_util/dart2js/js_util_dart2js.dart b/sdk/lib/js_util/dart2js/js_util_dart2js.dart
index ac832ff..6b605fb 100644
--- a/sdk/lib/js_util/dart2js/js_util_dart2js.dart
+++ b/sdk/lib/js_util/dart2js/js_util_dart2js.dart
@@ -60,14 +60,14 @@
newObject() => JS('=Object', '{}');
-hasProperty(o, name) => JS('bool', '# in #', name, o);
+bool hasProperty(o, name) => JS('bool', '# in #', name, o);
getProperty(o, name) => JS('Object|Null', '#[#]', o, name);
setProperty(o, name, value) => JS('', '#[#]=#', o, name, value);
callMethod(o, String method, List args) =>
JS('Object|Null', '#[#].apply(#, #)', o, method, o, args);
-instanceof(o, Function type) => JS('bool', '# instanceof #', o, type);
+bool instanceof(o, Function type) => JS('bool', '# instanceof #', o, type);
callConstructor(Function constr, List arguments) {
if (arguments == null) {
return JS('Object', 'new #()', constr);