Index: lib/runtime/dart/_interceptors.js |
diff --git a/lib/runtime/dart/_interceptors.js b/lib/runtime/dart/_interceptors.js |
index 2481a9376e227f81dce8ca9d36ae8c7172bcb44f..85e1bb2b4c2115d7d97d4ccf7d88341a71b37b6f 100644 |
--- a/lib/runtime/dart/_interceptors.js |
+++ b/lib/runtime/dart/_interceptors.js |
@@ -208,15 +208,13 @@ dart_library.library('dart/_interceptors', null, /* Imports */[ |
dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); |
return _internal.IterableMixinWorkaround.fold(this, initialValue, combine); |
} |
- [dartx.firstWhere](test, opts) { |
+ [dartx.firstWhere](test, {orElse = null} = {}) { |
dart.as(test, dart.functionType(core.bool, [E])); |
- let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
dart.as(orElse, dart.functionType(E, [])); |
return dart.as(_internal.IterableMixinWorkaround.firstWhere(this, test, orElse), E); |
} |
- [dartx.lastWhere](test, opts) { |
+ [dartx.lastWhere](test, {orElse = null} = {}) { |
dart.as(test, dart.functionType(core.bool, [E])); |
- let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
dart.as(orElse, dart.functionType(E, [])); |
return dart.as(_internal.IterableMixinWorkaround.lastWhereList(this, test, orElse), E); |
} |
@@ -345,8 +343,7 @@ dart_library.library('dart/_interceptors', null, /* Imports */[ |
toString() { |
return collection.ListBase.listToString(this); |
} |
- [dartx.toList](opts) { |
- let growable = opts && 'growable' in opts ? opts.growable : true; |
+ [dartx.toList]({growable = true} = {}) { |
let list = this.slice(); |
if (!dart.notNull(growable)) |
JSArray$().markFixedList(dart.as(list, core.List)); |
@@ -1005,9 +1002,7 @@ dart_library.library('dart/_interceptors', null, /* Imports */[ |
[dartx.replaceAllMapped](from, convert) { |
return this[dartx.splitMapJoin](from, {onMatch: convert}); |
} |
- [dartx.splitMapJoin](from, opts) { |
- let onMatch = opts && 'onMatch' in opts ? opts.onMatch : null; |
- let onNonMatch = opts && 'onNonMatch' in opts ? opts.onNonMatch : null; |
+ [dartx.splitMapJoin](from, {onMatch = null, onNonMatch = null} = {}) { |
return dart.as(_js_helper.stringReplaceAllFuncUnchecked(this, from, onMatch, onNonMatch), core.String); |
} |
[dartx.replaceFirst](from, to, startIndex) { |