Cleanup method signatures.
BUG=
R=jmesserly@google.com
Review URL: https://codereview.appspot.com/198060043
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 79efbe7..b6786e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+#### 0.12.2+1
+ * Cleanup some method signatures.
+
#### 0.12.2
* Updated to match release 0.5.1
[observe-js#d530515](https://github.com/Polymer/observe-js/commit/d530515).
diff --git a/lib/src/observer_transform.dart b/lib/src/observer_transform.dart
index 2ca9fda..7fab555 100644
--- a/lib/src/observer_transform.dart
+++ b/lib/src/observer_transform.dart
@@ -50,7 +50,7 @@
_getTransformer = computeValue,
_setTransformer = setValue;
- open(callback(value)) {
+ open(callback) {
_notifyCallback = callback;
_value = _getTransformer(_bindable.open(_observedCallback));
return _value;
diff --git a/lib/src/path_observer.dart b/lib/src/path_observer.dart
index 297bd1d..d0eb85d 100644
--- a/lib/src/path_observer.dart
+++ b/lib/src/path_observer.dart
@@ -41,7 +41,7 @@
PropertyPath get path => _path;
/// Sets the value at this path.
- void set value(Object newValue) {
+ void set value(newValue) {
if (_path != null) _path.setValueFrom(_object, newValue);
}
@@ -289,8 +289,7 @@
// TODO(sigmund): should we also support using checking dynamically for
// whether the type practically implements the indexer API
// (smoke.hasInstanceMethod(type, const Symbol('[]')))?
- if (object is Indexable<String, dynamic> ||
- object is Map<String, dynamic> && !_MAP_PROPERTIES.contains(property)) {
+ if (object is Indexable || object is Map && !_MAP_PROPERTIES.contains(property)) {
return object[smoke.symbolToName(property)];
}
try {
@@ -320,8 +319,7 @@
}
} else if (property is Symbol) {
// Support indexer if available, e.g. Maps or polymer_expressions Scope.
- if (object is Indexable<String, dynamic> ||
- object is Map<String, dynamic> && !_MAP_PROPERTIES.contains(property)) {
+ if (object is Indexable || object is Map && !_MAP_PROPERTIES.contains(property)) {
object[smoke.symbolToName(property)] = value;
return true;
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 8798512..7dd146a 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: observe
-version: 0.12.2
+version: 0.12.2+1
author: Polymer.dart Authors <web-ui-dev@dartlang.org>
description: >
Observable properties and objects for use in template_binding.
@@ -13,7 +13,7 @@
barback: '>=0.14.2 <0.16.0'
logging: '>=0.9.0 <0.10.0'
path: '>=0.9.0 <2.0.0'
- smoke: '>=0.1.0 <0.3.0'
+ smoke: '>=0.1.0 <0.4.0'
source_maps: '>=0.9.4 <0.11.0'
source_span: '>=1.0.0 <2.0.0'
utf: '>=0.9.0 <0.10.0'