Skip to content

Commit

Permalink
remove PolymerPropertyEffects type, inline DataTrigger and DataEffect…
Browse files Browse the repository at this point in the history
… types
  • Loading branch information
dfreedm committed Jun 16, 2017
1 parent 3b7eedb commit 7612df6
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 94 deletions.
26 changes: 13 additions & 13 deletions closure.log
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,39 @@ polymer.html_script_26.js:173: WARNING - Property mutableData never defined on t
return mutablePropertyChange(this, property, value, old, this.mutableData);
^^^^^^^^^^^^^^^^

polymer.html_script_31.js:318: WARNING - Property as never defined on this of type DomRepeat{template:Element|null}
polymer.html_script_31.js:318: WARNING - Property as never defined on this of type DomRepeat{template: Element|null}
instanceProps[this.as] = true;
^^^^^^^

polymer.html_script_31.js:319: WARNING - Property indexAs never defined on this of type DomRepeat{template:Element|null}
polymer.html_script_31.js:319: WARNING - Property indexAs never defined on this of type DomRepeat{template: Element|null}
instanceProps[this.indexAs] = true;
^^^^^^^^^^^^

polymer.html_script_31.js:320: WARNING - Property itemsIndexAs never defined on this of type DomRepeat{template:Element|null}
polymer.html_script_31.js:320: WARNING - Property itemsIndexAs never defined on this of type DomRepeat{template: Element|null}
instanceProps[this.itemsIndexAs] = true;
^^^^^^^^^^^^^^^^^

polymer.html_script_31.js:418: WARNING - Property _targetFrameTime never defined on this of type DomRepeat
let ratio = this._targetFrameTime / (currChunkTime - this.__lastChunkTime);
^^^^^^^^^^^^^^^^^^^^^

polymer.html_script_31.js:450: WARNING - Property delay never defined on this of type DomRepeat{__observePaths:truthy}
polymer.html_script_31.js:450: WARNING - Property delay never defined on this of type DomRepeat{__observePaths: truthy}
this.__debounceRender(this.__render, this.delay);
^^^^^^^^^^

polymer.html_script_31.js:495: WARNING - Property _setRenderedItemCount never defined on this of type DomRepeat{__pool:{length:number} (loose)}
polymer.html_script_31.js:495: WARNING - Property _setRenderedItemCount never defined on this of type DomRepeat{__pool: {length: number} (loose)}
this._setRenderedItemCount(this.__instances.length);
^^^^^^^^^^^^^^^^^^^^^^^^^^

polymer.html_script_31.js:531: WARNING - Property as never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object{}, __limit:number, items:?=}
polymer.html_script_31.js:531: WARNING - Property as never defined on this of type DomRepeat{__instances: Object, __itemsIdxToInstIdx: Object{}, __limit: number, items: ?=}
inst._setPendingProperty(this.as, item);
^^^^^^^

polymer.html_script_31.js:532: WARNING - Property indexAs never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object{}, __limit:number, items:?=}
polymer.html_script_31.js:532: WARNING - Property indexAs never defined on this of type DomRepeat{__instances: Object, __itemsIdxToInstIdx: Object{}, __limit: number, items: ?=}
inst._setPendingProperty(this.indexAs, instIdx);
^^^^^^^^^^^^

polymer.html_script_31.js:533: WARNING - Property itemsIndexAs never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object{}, __limit:number, items:?=}
polymer.html_script_31.js:533: WARNING - Property itemsIndexAs never defined on this of type DomRepeat{__instances: Object, __itemsIdxToInstIdx: Object{}, __limit: number, items: ?=}
inst._setPendingProperty(this.itemsIndexAs, itemIdx);
^^^^^^^^^^^^^^^^^

Expand All @@ -74,19 +74,19 @@ polymer.html_script_31.js:571: WARNING - Property itemsIndexAs never defined on
model[this.itemsIndexAs] = itemIdx;
^^^^^^^^^^^^^^^^^

polymer.html_script_31.js:580: WARNING - Property as never defined on this of type DomRepeat{__pool:{pop:LOOSE_TOP_FUNCTION} (loose)}
polymer.html_script_31.js:580: WARNING - Property as never defined on this of type DomRepeat{__pool: {pop: LOOSE_TOP_FUNCTION} (loose)}
inst._setPendingProperty(this.as, item);
^^^^^^^

polymer.html_script_31.js:581: WARNING - Property indexAs never defined on this of type DomRepeat{__pool:{pop:LOOSE_TOP_FUNCTION} (loose)}
polymer.html_script_31.js:581: WARNING - Property indexAs never defined on this of type DomRepeat{__pool: {pop: LOOSE_TOP_FUNCTION} (loose)}
inst._setPendingProperty(this.indexAs, instIdx);
^^^^^^^^^^^^

polymer.html_script_31.js:582: WARNING - Property itemsIndexAs never defined on this of type DomRepeat{__pool:{pop:LOOSE_TOP_FUNCTION} (loose)}
polymer.html_script_31.js:582: WARNING - Property itemsIndexAs never defined on this of type DomRepeat{__pool: {pop: LOOSE_TOP_FUNCTION} (loose)}
inst._setPendingProperty(this.itemsIndexAs, itemIdx);
^^^^^^^^^^^^^^^^^

polymer.html_script_31.js:619: WARNING - Property as never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object}
polymer.html_script_31.js:619: WARNING - Property as never defined on this of type DomRepeat{__instances: Object, __itemsIdxToInstIdx: Object}
let itemPath = this.as + (itemSubPath ? '.' + itemSubPath : '');
^^^^^^^

Expand Down Expand Up @@ -130,4 +130,4 @@ polymer.html_script_35.js:5: WARNING - Property _mutablePropertyChange never def
let mutablePropertyChange = Polymer.MutableData._mutablePropertyChange;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 error(s), 33 warning(s), 75.8% typed
0 error(s), 33 warning(s), 75.7% typed
55 changes: 42 additions & 13 deletions externs/closure-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ Polymer_PropertyEffects._addTemplatePropertyEffect = function(templateInfo, prop
*/
Polymer_PropertyEffects._parseBindings = function(text, templateInfo){};
/**
* @param {(PropertyEffectsInstance|Polymer_PropertyEffects)} inst Element that should be used as scope for
* @param {this} inst Element that should be used as scope for
binding dependencies
* @param {Object} part Binding part metadata
* @param {string} path Property/path that triggered this effect
Expand Down Expand Up @@ -1189,7 +1189,7 @@ Polymer_ElementMixin._addTemplatePropertyEffect = function(templateInfo, prop, e
*/
Polymer_ElementMixin._parseBindings = function(text, templateInfo){};
/**
* @param {(PropertyEffectsInstance|Polymer_PropertyEffects)} inst Element that should be used as scope for
* @param {this} inst Element that should be used as scope for
binding dependencies
* @param {Object} part Binding part metadata
* @param {string} path Property/path that triggered this effect
Expand Down Expand Up @@ -1627,7 +1627,7 @@ Polymer_LegacyElementMixin.prototype._ensureAttributes = function(){};
Polymer_LegacyElementMixin.prototype._applyListeners = function(){};
/**
* @param {*} value Value to deserialize
* @return {string}
* @return {(string|undefined)}
*/
Polymer_LegacyElementMixin.prototype.serialize = function(value){};
/**
Expand Down Expand Up @@ -2004,7 +2004,7 @@ Polymer_LegacyElementMixin._addTemplatePropertyEffect = function(templateInfo, p
*/
Polymer_LegacyElementMixin._parseBindings = function(text, templateInfo){};
/**
* @param {(PropertyEffectsInstance|Polymer_PropertyEffects)} inst Element that should be used as scope for
* @param {this} inst Element that should be used as scope for
binding dependencies
* @param {Object} part Binding part metadata
* @param {string} path Property/path that triggered this effect
Expand Down Expand Up @@ -2044,7 +2044,7 @@ Polymer_OptionalMutableData.prototype.mutableData;
Polymer_OptionalMutableData.prototype._shouldPropertyChange = function(property, value, old){};
/**
* @record
* @extends {Polymer_PropertyEffects}
* @extends {Polymer_ElementMixin}
*/
function Polymer_ArraySelectorMixin(){}
/** @type {Array} */
Expand Down Expand Up @@ -2089,12 +2089,14 @@ Polymer_ArraySelectorMixin.prototype._addEventListenerToNode = function(node, ev
*/
Polymer_ArraySelectorMixin.prototype._removeEventListenerFromNode = function(node, eventName, handler){};
/**
* @param {string} name Name of attribute that changed
* @param {?string} old Old attribute value
* @param {?string} value New attribute value
* @override
* @param {string} name Name of attribute.
* @param {?string} old Old value of attribute.
* @param {?string} value Current value of attribute.
*/
Polymer_ArraySelectorMixin.prototype.attributeChangedCallback = function(name, old, value){};
/**
* @override
*/
Polymer_ArraySelectorMixin.prototype._initializeProperties = function(){};
/**
Expand Down Expand Up @@ -2260,6 +2262,7 @@ Polymer_ArraySelectorMixin.prototype._enqueueClient = function(client){};
*/
Polymer_ArraySelectorMixin.prototype._flushClients = function(){};
/**
* @override
*/
Polymer_ArraySelectorMixin.prototype._readyClients = function(){};
/**
Expand Down Expand Up @@ -2412,6 +2415,31 @@ Polymer_ArraySelectorMixin.prototype._bindTemplate = function(template, instance
*/
Polymer_ArraySelectorMixin.prototype._removeBoundDom = function(dom){};
/**
* @override
*/
Polymer_ArraySelectorMixin.prototype.connectedCallback = function(){};
/**
* @override
*/
Polymer_ArraySelectorMixin.prototype.disconnectedCallback = function(){};
/**
* @param {NodeList} dom to attach to the element.
* @return {Node}
*/
Polymer_ArraySelectorMixin.prototype._attachDom = function(dom){};
/**
* @param {Object=} properties Bag of custom property key/values to
apply to this element.
*/
Polymer_ArraySelectorMixin.prototype.updateStyles = function(properties){};
/**
* @param {string} url URL to resolve.
* @param {string=} base Optional base URL to resolve against, defaults
to the element's `importPath`
* @return {string}
*/
Polymer_ArraySelectorMixin.prototype.resolveUrl = function(url, base){};
/**
*/
Polymer_ArraySelectorMixin.prototype.clearSelection = function(){};
/**
Expand Down Expand Up @@ -2448,9 +2476,7 @@ Polymer_ArraySelectorMixin.prototype.selectIndex = function(idx){};
*/
Polymer_ArraySelectorMixin._parseTemplate = function(template, outerTemplateInfo){};
/**
* @param {*} template
* @param {*} templateInfo
* @param {*} nodeInfo
* @override
*/
Polymer_ArraySelectorMixin._parseTemplateContent = function(template, templateInfo, nodeInfo){};
/**
Expand Down Expand Up @@ -2559,7 +2585,7 @@ Polymer_ArraySelectorMixin._addTemplatePropertyEffect = function(templateInfo, p
*/
Polymer_ArraySelectorMixin._parseBindings = function(text, templateInfo){};
/**
* @param {(PropertyEffectsInstance|Polymer_PropertyEffects)} inst Element that should be used as scope for
* @param {this} inst Element that should be used as scope for
binding dependencies
* @param {Object} part Binding part metadata
* @param {string} path Property/path that triggered this effect
Expand All @@ -2568,4 +2594,7 @@ Polymer_ArraySelectorMixin._parseBindings = function(text, templateInfo){};
* @param {boolean} hasPaths True with `props` contains one or more paths
* @return {*}
*/
Polymer_ArraySelectorMixin._evaluateBinding = function(inst, part, path, props, oldProps, hasPaths){};
Polymer_ArraySelectorMixin._evaluateBinding = function(inst, part, path, props, oldProps, hasPaths){};
/**
*/
Polymer_ArraySelectorMixin.finalize = function(){};
40 changes: 1 addition & 39 deletions externs/polymer-externs.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,42 +72,4 @@ PolymerTelemetry.prototype._regLog;
/** @type {function(HTMLElement)} */
PolymerTelemetry.prototype.register;
/** @type {function(HTMLElement)} */
PolymerTelemetry.prototype.dumpRegistrations;

/**
* @typedef {{
* name: (string | undefined),
* structured: (boolean | undefined),
* wildcard: (boolean | undefined)
* }}
*/
var DataTrigger;

/**
* @typedef {{
* info: ?,
* trigger: (!DataTrigger | undefined),
* fn: (!Function | undefined)
* }}
*/
var DataEffect;

/**
* @record
* @extends {Polymer_PropertyEffects}
*/
function PropertyEffectsInstance(){}
/** @type {Object<string, !Array<!DataEffect>>} */
PropertyEffectsInstance.prototype.__computeEffects;
/** @type {Object<string, !Array<!DataEffect>>} */
PropertyEffectsInstance.prototype.__reflectEffects;
/** @type {Object<string, !Array<!DataEffect>>} */
PropertyEffectsInstance.prototype.__notifyEffects;
/** @type {Object<string, !Array<!DataEffect>>} */
PropertyEffectsInstance.prototype.__propagateEffects;
/** @type {Object<string, !Array<!DataEffect>>} */
PropertyEffectsInstance.prototype.__observeEffects;
/** @type {Object<string, !Array<!DataEffect>>} */
PropertyEffectsInstance.prototype.__readOnly;
/** @type {Object} */
PropertyEffectsInstance.prototype.__data;
PolymerTelemetry.prototype.dumpRegistrations;
10 changes: 5 additions & 5 deletions lib/elements/array-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<link rel="import" href="../mixins/property-effects.html">
<link rel="import" href="../../polymer-element.html">
<link rel="import" href="../utils/mixin.html">
<link rel="import" href="../utils/array-splice.html">

Expand All @@ -31,7 +31,7 @@
* is an array of multiply selected items.
*
* @polymerMixin
* @mixes Polymer.PropertyEffects
* @mixes Polymer.ElementMixin
* @memberof Polymer
* @summary Element mixin for recording dynamic associations between item paths in a
* master `items` array and a `selected` array
Expand All @@ -41,16 +41,16 @@
/**
* @constructor
* @extends {superClass}
* @implements {Polymer_PropertyEffects}
* @implements {Polymer_ElementMixin}
*/
let propertyEffectsBase = Polymer.PropertyEffects(superClass);
let elementBase = Polymer.ElementMixin(superClass);

/**
* @polymerMixinClass
* @implements {Polymer_ArraySelectorMixin}
* @unrestricted
*/
class ArraySelectorMixin extends propertyEffectsBase {
class ArraySelectorMixin extends elementBase {

static get properties() {

Expand Down
9 changes: 5 additions & 4 deletions lib/legacy/legacy-element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@
* the `_serializeValue` method provided by `Polymer.PropertyAccessors`.
*
* @param {*} value Value to deserialize
* @return {string} Serialized value
* @return {string | undefined} Serialized value
*/
serialize(value) {
return this._serializeValue(value) || '';
return this._serializeValue(value);
}

/**
Expand Down Expand Up @@ -457,10 +457,11 @@
* a user should call `distributeContent` if distribution has been
* invalidated due to an element being added or removed from the shadowRoot
* that contains an insertion point (`<slot>`) inside its subtree.
* @suppress {missingProperties}
*/
distributeContent() {
if (window.ShadyDOM) {
window.ShadyDOM.flush();
if (window.ShadyDOM && this.shadowRoot) {
this.shadowRoot.forceRender();
}
}

Expand Down
Loading

0 comments on commit 7612df6

Please sign in to comment.