Skip to content

Commit

Permalink
set isAttached constructor (for closure) but set to undefined so no…
Browse files Browse the repository at this point in the history
…t picked up as proto property (avoids initial binding value)
  • Loading branch information
Steven Orvell committed Apr 27, 2017
1 parent 2c9ffac commit 6a995a2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
20 changes: 16 additions & 4 deletions closure.log
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,24 @@ Found : undefined
return window.Polymer._polymerFn(info);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/polymer.html_script_1.js:44: WARNING - The right side in the assignment is not a subtype of the left side.
Expected : T
Found : Function|null
More details:
The found type is a union that includes an unexpected type: null
mixin = cachingMixin(mixin);
^^^^^^^^^^^^^^^^^^^^^^^^^^^

/polymer.html_script_1.js:44: WARNING - Invalid type for parameter 1 of function cachingMixin.
Expected : Function|null
Found : T

let cachedMixin = cachingMixin(mixin);
^^^^^
mixin = cachingMixin(mixin);
^^^^^

/polymer.html_script_1.js:46: WARNING - Cannot create property __dedupeId on non-object type T.
mixin.__dedupeId = ++dedupeId;
^^^^^

/polymer.html_script_1.js:47: WARNING - Returned type does not match declared return type.
Expected : T
Expand Down Expand Up @@ -693,7 +705,7 @@ Found : PolymerElement
!(window.customElements.polyfillWrapFlushCallback);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/polymer.html_script_22.js:855: WARNING - Function this.splice: called with 3 argument(s). Function requires at least 4 argument(s) and at most 4.
/polymer.html_script_22.js:857: WARNING - Function this.splice: called with 3 argument(s). Function requires at least 4 argument(s) and at most 4.
return this.splice(arrayOrPath, index, 1);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -1366,4 +1378,4 @@ externs/closure-types.js:759: WARNING - property toggle on interface Polymer_Arr
Polymer_ArraySelectorMixin.prototype.toggle;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 error(s), 297 warning(s), 72.7% typed
0 error(s), 299 warning(s), 72.7% typed
6 changes: 4 additions & 2 deletions lib/legacy/legacy-element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@
constructor() {
super();
this.root = this;
this.created();
this.isAttached = false;
// initialize for closure but don't make false or a binding will see
// this setting.
this.isAttached = undefined;
this.__boundListeners = null;
this._debouncers = null;
this.created();
}

/**
Expand Down

0 comments on commit 6a995a2

Please sign in to comment.