Skip to content

Commit

Permalink
refactor remove legacy way of declaring objects in an interface
Browse files Browse the repository at this point in the history
objects in interface definition are no longer represented as {},
but either as {$type: "Object"} or a shortcut notation "Object"
  • Loading branch information
jakub-g committed Mar 21, 2013
1 parent 49a4f99 commit 19c7f09
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions src/aria/core/Interfaces.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -61,16 +61,6 @@
$type : "Function" $type : "Function"
}; };


/**
* Contains the definition for an object defined in the interface by: {}. This way of defining an object in an
* interface is deprecated and will be removed in a future release of Aria Templates.
* @type {Object}
* @private
*/
var __simpleObjectDefinition = {
$type : "Object"
};

/** /**
* Contains the definition for an array defined in the interface by: [] * Contains the definition for an array defined in the interface by: []
* @type {Object} * @type {Object}
Expand Down Expand Up @@ -98,13 +88,7 @@
} else if (typeUtils.isArray(def)) { } else if (typeUtils.isArray(def)) {
return __simpleArrayDefinition; return __simpleArrayDefinition;
} else if (typeUtils.isObject(def)) { } else if (typeUtils.isObject(def)) {
if (def.$type == null) { res = def;
this.$logWarn("Member '%2' in interface '%1' uses a deprecated way of declaring an object in an interface. Please use {$type:'Object'} instead of {}.", [
classpath, member]);
res = __simpleObjectDefinition;
} else {
res = def;
}
} else { } else {
return null; return null;
} }
Expand Down Expand Up @@ -513,4 +497,4 @@
} }
} }
}); });
})(); })();

0 comments on commit 19c7f09

Please sign in to comment.