From 5ee6d2e9e878cacba7e8bec6634e896947f3e7b5 Mon Sep 17 00:00:00 2001 From: Obaid Ahmed Date: Thu, 17 Aug 2017 22:27:15 -0400 Subject: [PATCH] Updated documentation --- list/list.js | 9 +++++++++ map/map.js | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/list/list.js b/list/list.js index 934ecda..a4f8881 100644 --- a/list/list.js +++ b/list/list.js @@ -295,6 +295,8 @@ var DefineList = Construct.extend("DefineList", * list.assign({count: 1000, skip: 2}); * list.get("count") //-> 1000 * ``` + * @param {Array} newProps Properties that need to be assigned to the list instance + * @return {can-define/list/list} The list instance. */ assign: function(prop) { if (canReflect.isListLike(prop)) { @@ -321,6 +323,8 @@ var DefineList = Construct.extend("DefineList", * list.get("count") //-> 1000 * list.get("skip") //-> undefined * ``` + * @param {Array} newProps Properties that need to be updated to the list instance + * @return {can-define/list/list} The list instance. */ update: function(prop) { if (canReflect.isListLike(prop)) { @@ -349,6 +353,9 @@ var DefineList = Construct.extend("DefineList", * list.get("count") //-> 1000 * list.get("skip") //-> 2 * ``` + * + * @param {Array} newProps Properties that need to be assigned to the list instance + * @return {can-define/list/list} The list instance. */ assignDeep: function(prop) { if (canReflect.isListLike(prop)) { @@ -377,6 +384,8 @@ var DefineList = Construct.extend("DefineList", * list.get("skip") //-> undefined * list.get("foo") // -> {bar: 'yay', a: undefined} * ``` + * @param {Array} newProps Properties that need to be updated on the list instance + * @return {can-define/list/list} The list instance. */ updateDeep: function(prop) { if (canReflect.isListLike(prop)) { diff --git a/map/map.js b/map/map.js index 7e94b53..a46630e 100644 --- a/map/map.js +++ b/map/map.js @@ -210,9 +210,6 @@ var DefineMap = Construct.extend("DefineMap",{ * corresponding key in `props`, effectively replacing `props` into the Map. * Properties not in `props` will not be changed. * - * @param {Object} props A collection of key-value pairs to set. - * If any properties already exist on the map, they will be overwritten. - * * ```js * var MyMap = DefineMap.extend({ * list: DefineList, @@ -229,6 +226,9 @@ var DefineMap = Construct.extend("DefineMap",{ * obj.list //-> ['first'] * obj.foo //-> 'bar' * ``` + * @param {Object} props A collection of key-value pairs to set. + * If any properties already exist on the map, they will be overwritten. + * * @return {can-define/map/map} The map instance for chaining. * */