Skip to content

Commit

Permalink
Polymer.Path.get accepts both a string path or an Array path, so
Browse files Browse the repository at this point in the history
functions that call this should allow for either as well. Already
changed for Polymer.prototype.push here:

#4776
  • Loading branch information
beckysiegel committed Aug 11, 2017
1 parent 9591b2f commit 42ce5a8
Show file tree
Hide file tree
Showing 3 changed files with 8,725 additions and 25 deletions.
40 changes: 20 additions & 20 deletions externs/closure-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,31 +580,31 @@ Polymer_PropertyEffects.prototype.get = function(path, root){};
*/
Polymer_PropertyEffects.prototype.set = function(path, value, root){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {...*} items
* @return {number}
*/
Polymer_PropertyEffects.prototype.push = function(path, items){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @return {*}
*/
Polymer_PropertyEffects.prototype.pop = function(path){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {number} start Index from which to start removing/inserting.
* @param {number} deleteCount Number of items to remove.
* @param {...*} items
* @return {Array}
*/
Polymer_PropertyEffects.prototype.splice = function(path, start, deleteCount, items){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @return {*}
*/
Polymer_PropertyEffects.prototype.shift = function(path){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {...*} items
* @return {number}
*/
Expand Down Expand Up @@ -1070,31 +1070,31 @@ Polymer_ElementMixin.prototype.get = function(path, root){};
*/
Polymer_ElementMixin.prototype.set = function(path, value, root){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {...*} items
* @return {number}
*/
Polymer_ElementMixin.prototype.push = function(path, items){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @return {*}
*/
Polymer_ElementMixin.prototype.pop = function(path){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {number} start Index from which to start removing/inserting.
* @param {number} deleteCount Number of items to remove.
* @param {...*} items
* @return {Array}
*/
Polymer_ElementMixin.prototype.splice = function(path, start, deleteCount, items){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @return {*}
*/
Polymer_ElementMixin.prototype.shift = function(path){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {...*} items
* @return {number}
*/
Expand Down Expand Up @@ -1603,31 +1603,31 @@ Polymer_LegacyElementMixin.prototype.get = function(path, root){};
*/
Polymer_LegacyElementMixin.prototype.set = function(path, value, root){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {...*} items
* @return {number}
*/
Polymer_LegacyElementMixin.prototype.push = function(path, items){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @return {*}
*/
Polymer_LegacyElementMixin.prototype.pop = function(path){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {number} start Index from which to start removing/inserting.
* @param {number} deleteCount Number of items to remove.
* @param {...*} items
* @return {Array}
*/
Polymer_LegacyElementMixin.prototype.splice = function(path, start, deleteCount, items){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @return {*}
*/
Polymer_LegacyElementMixin.prototype.shift = function(path){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {...*} items
* @return {number}
*/
Expand Down Expand Up @@ -2452,31 +2452,31 @@ Polymer_ArraySelectorMixin.prototype.get = function(path, root){};
*/
Polymer_ArraySelectorMixin.prototype.set = function(path, value, root){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {...*} items
* @return {number}
*/
Polymer_ArraySelectorMixin.prototype.push = function(path, items){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @return {*}
*/
Polymer_ArraySelectorMixin.prototype.pop = function(path){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {number} start Index from which to start removing/inserting.
* @param {number} deleteCount Number of items to remove.
* @param {...*} items
* @return {Array}
*/
Polymer_ArraySelectorMixin.prototype.splice = function(path, start, deleteCount, items){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @return {*}
*/
Polymer_ArraySelectorMixin.prototype.shift = function(path){};
/**
* @param {string} path Path to array.
* @param {(string|!Array.<(string|number)>)} path Path to array.
* @param {...*} items
* @return {number}
*/
Expand Down
10 changes: 5 additions & 5 deletions lib/mixins/property-effects.html
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@
* This method notifies other paths to the same array that a
* splice occurred to the array.
*
* @param {string} path Path to array.
* @param {string | !Array<string|number>} path Path to array.
* @param {...*} items Items to push onto array
* @return {number} New length of the array.
* @public
Expand All @@ -1834,7 +1834,7 @@
* This method notifies other paths to the same array that a
* splice occurred to the array.
*
* @param {string} path Path to array.
* @param {string | !Array<string|number>} path Path to array.
* @return {*} Item that was removed.
* @public
*/
Expand All @@ -1859,7 +1859,7 @@
* This method notifies other paths to the same array that a
* splice occurred to the array.
*
* @param {string} path Path to array.
* @param {string | !Array<string|number>} path Path to array.
* @param {number} start Index from which to start removing/inserting.
* @param {number} deleteCount Number of items to remove.
* @param {...*} items Items to insert into array.
Expand Down Expand Up @@ -1894,7 +1894,7 @@
* This method notifies other paths to the same array that a
* splice occurred to the array.
*
* @param {string} path Path to array.
* @param {string | !Array<string|number>} path Path to array.
* @return {*} Item that was removed.
* @public
*/
Expand All @@ -1918,7 +1918,7 @@
* This method notifies other paths to the same array that a
* splice occurred to the array.
*
* @param {string} path Path to array.
* @param {string | !Array<string|number>} path Path to array.
* @param {...*} items Items to insert info array
* @return {number} New length of the array.
* @public
Expand Down
Loading

0 comments on commit 42ce5a8

Please sign in to comment.