Skip to content

Commit

Permalink
Revert "Remove documentation on deprecated set() calls"
Browse files Browse the repository at this point in the history
This reverts commit 7c7677d.
  • Loading branch information
matthewp committed Jul 2, 2018
1 parent d49acd0 commit 852de76
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
17 changes: 16 additions & 1 deletion list/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ var DefineList = Construct.extend("DefineList",
* @function can-define/list/list.prototype.set set
* @parent can-define/list/list.prototype
*
* @description Sets an item or property or properties on a list.
* @deprecated {3.10.1} Using .set with {Object} `props` has been deprecated in favour of `assign` and `update`
*
* @description Sets an item or property or items or properties on a list.
*
* @signature `list.set(prop, value)`
*
Expand All @@ -249,6 +251,19 @@ var DefineList = Construct.extend("DefineList",
* @param {*} value The value to add to the list.
* @return {can-define/list/list} The list instance.
*
* @signature `list.set(newProps)`
*
* Updates the properties on the list with `newProps`.
*
* ```js
* var list = new DefineList(["A","B"]);
* list.set({count: 1000, skip: 2});
* list.get("count") //-> 1000
* ```
*
* @param {Object} newProps An object of properties and values to set on the list.
* @return {can-define/list/list} The list instance.
*
* @signature `list.set(index, value)`
*
* Sets the item at `index`. Typically, [can-define/list/list::splice] should be used instead.
Expand Down
17 changes: 16 additions & 1 deletion map/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,22 @@ var DefineMap = Construct.extend("DefineMap",{
* @function can-define/map/map.prototype.set set
* @parent can-define/map/map.prototype
*
* @description Sets a property that wasn't predefined.
* @deprecated {3.10.1} Passing an {Object} to `.set` has been deprecated in favor of [can-define/map/map.prototype.assign] or [can-define/map/map.prototype.update]. `map.set(propName, value)` is _not_ deprecated.
*
* @description Sets multiple properties on a map instance or a property that wasn't predefined.
*
* @signature `map.set(props [,removeProps])`
*
* Assigns each value in `props` to a property on this map instance named after the
* corresponding key in `props`, effectively merging `props` into the Map. If `removeProps` is true, properties not in
* `props` will be set to `undefined`.
*
* @param {Object} props A collection of key-value pairs to set.
* If any properties already exist on the map, they will be overwritten.
*
* @param {Boolean} [removeProps=false] Whether to set keys not present in `props` to `undefined`.
*
* @return {can-define/map/map} The map instance for chaining.
*
* @signature `map.set(propName, value)`
*
Expand Down

0 comments on commit 852de76

Please sign in to comment.