Skip to content

Commit

Permalink
[ci skip] reduce warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Apr 17, 2017
1 parent 8867fde commit 00f9e3e
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 21 deletions.
4 changes: 3 additions & 1 deletion lib/elements/array-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* @polymerMixinClass
* @implements {Polymer_ArraySelectorMixin}
*/
return class extends superClass {
class ArraySelectorMixin extends superClass {

static get properties() {

Expand Down Expand Up @@ -317,6 +317,8 @@

}

return ArraySelectorMixin;

});

// export mixin
Expand Down
4 changes: 3 additions & 1 deletion lib/legacy/legacy-element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
* @polymerMixinClass
* @implements {Polymer_LegacyElement}
*/
return class LegacyElement extends legacyElementBase {
class LegacyElement extends legacyElementBase {

constructor() {
super();
Expand Down Expand Up @@ -909,6 +909,8 @@

}

return LegacyElement;

});

})();
Expand Down
1 change: 1 addition & 0 deletions lib/legacy/polymer-fn.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*
* See `Polymer.Class` for details on valid legacy metadata format for `info`.
*
* @override
* @function Polymer
* @param {Object} info Object containing Polymer metadata and functions
* to become class methods.
Expand Down
4 changes: 3 additions & 1 deletion lib/mixins/gesture-event-listeners.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* @polymerMixinClass
* @implements {Polymer_GestureEventListeners}
*/
return class GestureEventListeners extends superClass {
class GestureEventListeners extends superClass {

_addEventListenerToNode(node, eventName, handler) {
if (!gestures.addListener(node, eventName, handler)) {
Expand All @@ -53,6 +53,8 @@

}

return GestureEventListeners;

});

})();
Expand Down
8 changes: 6 additions & 2 deletions lib/mixins/mutable-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
* @polymerMixinClass
* @implements {Polymer_MutableData}
*/
return class MutableData extends superClass {
class MutableData extends superClass {
/**
* Overrides `Polymer.PropertyEffects` to provide option for skipping
* strict equality checking for Objects and Arrays.
Expand All @@ -100,6 +100,8 @@

}

return MutableData;

});

/**
Expand Down Expand Up @@ -145,7 +147,7 @@
* @polymerMixinClass
* @implements {Polymer_OptionalMutableData}
*/
return class OptionalMutableData extends superClass {
class OptionalMutableData extends superClass {

static get properties() {
return {
Expand Down Expand Up @@ -181,6 +183,8 @@
}
}

return OptionalMutableData;

});

// Export for use by legacy behavior
Expand Down
10 changes: 6 additions & 4 deletions lib/mixins/property-effects.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

'use strict';

/** @const {Object} */
const CaseMap = Polymer.CaseMap;

// Monotonically increasing unique ID used for de-duping effects triggered
Expand Down Expand Up @@ -86,7 +87,7 @@
* on an instance.
*
* @param {Object} inst The instance with effects to run
* @param {string} effects Array of effects to run for this property
* @param {Object} effects Array of effects to run for this property
* @param {Object} props Bag of current property changes
* @param {Object=} oldProps Bag of previous values for changed properties
* @param {boolean=} hasPaths True with `props` contains one or more paths
Expand All @@ -96,7 +97,7 @@
*/
function runEffects(inst, effects, props, oldProps, hasPaths, extraArgs) {
if (effects) {
let ran;
let ran = false;
let id = dedupeId++;
for (let prop in props) {
if (runEffectsForProperty(inst, effects, id, prop, props, oldProps, hasPaths, extraArgs)) {
Expand All @@ -105,13 +106,14 @@
}
return ran;
}
return false;
}

/**
* Runs a list of effects for a given property.
*
* @param {Object} inst The instance with effects to run
* @param {Array} effects Array of effects
* @param {Object} effects Array of effects
* @param {number} dedupeId Counter used for de-duping effects
* @param {string} prop Name of changed property
* @param {*} props Changed properties
Expand All @@ -122,7 +124,7 @@
* @private
*/
function runEffectsForProperty(inst, effects, dedupeId, prop, props, oldProps, hasPaths, extraArgs) {
let ran;
let ran = false;
let rootProperty = hasPaths ? Polymer.Path.root(prop) : prop;
let fxs = effects[rootProperty];
if (fxs) {
Expand Down
4 changes: 3 additions & 1 deletion lib/mixins/template-stamp.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
* @polymerMixinClass
* @implements {Polymer_TemplateStamp}
*/
return class TemplateStamp extends superClass {
class TemplateStamp extends superClass {

_initializeProperties() {
super._initializeProperties();
Expand Down Expand Up @@ -469,6 +469,8 @@

}

return TemplateStamp;

});

})();
Expand Down
8 changes: 4 additions & 4 deletions lib/utils/array-splice.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@
*
* @param {Array} current The current "changed" array for which to
* calculate splices.
* @param {Integer} currentStart Starting index in the `current` array for
* @param {number} currentStart Starting index in the `current` array for
* which splices are calculated.
* @param {Integer} currentEnd Ending index in the `current` array for
* @param {number} currentEnd Ending index in the `current` array for
* which splices are calculated.
* @param {Array} old The original "unchanged" array to compare `current`
* against to determine splices.
* @param {Integer} oldStart Starting index in the `old` array for
* @param {number} oldStart Starting index in the `old` array for
* which splices are calculated.
* @param {Integer} oldEnd Ending index in the `old` array for
* @param {number} oldEnd Ending index in the `old` array for
* which splices are calculated.
* @return {Array} Returns an array of splice record objects. Each of these
* contains: `index` the location where the splice occurred; `removed`
Expand Down
10 changes: 4 additions & 6 deletions lib/utils/mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
/**
* Given a mixin producing function, memoize applications of mixin to base
* @private
* @template T
* @param {T} mixin Mixin for which to create a caching mixin.
* @return {T} Returns a mixin which when applied multiple times to the
* @param {Function} mixin Mixin for which to create a caching mixin.
* @return {Function} Returns a mixin which when applied multiple times to the
* same base will always return the same extended class.
*/
function cachingMixin(mixin) {
Expand All @@ -48,9 +47,8 @@
* applications.
*
* @memberof Polymer
* @template {T}
* @param {T} mixin ES6 class expression mixin to wrap
* @return {T} Wrapped mixin that deduplicates and memoizes
* @param {Function} mixin ES6 class expression mixin to wrap
* @return {Function} Wrapped mixin that deduplicates and memoizes
* mixin applications to base
*/
Polymer.dedupingMixin = function(mixin) {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/templatize.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
// Base class for TemplateInstance's
/**
* @constructor
* @mixes {Polymer_PropertyEffects}
* @implements {Polymer_PropertyEffects}
*/
const base = Polymer.PropertyEffects(class {});
class TemplateInstanceBase extends base {
Expand Down

0 comments on commit 00f9e3e

Please sign in to comment.