Skip to content

Commit

Permalink
rebaseline warnings with NTI specific warnings disabled, for now
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed May 31, 2017
1 parent 7036fc2 commit abc229e
Show file tree
Hide file tree
Showing 9 changed files with 225 additions and 743 deletions.
848 changes: 153 additions & 695 deletions closure.log

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions externs/closure-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
*/
function Polymer_PropertyAccessors(){}
/**
* @param {*} name
* @param {*} old
* @param {*} value
* @param {string} name
* @param {?string} old
* @param {?string} value
*/
Polymer_PropertyAccessors.prototype.attributeChangedCallback = function(name, old, value){};
/**
Expand All @@ -35,8 +35,8 @@ Polymer_PropertyAccessors.prototype._initializeInstanceProperties = function(pro
Polymer_PropertyAccessors.prototype._ensureAttribute = function(attribute, value){};
/**
* @param {string} attribute
* @param {string} value
* @param {*} type
* @param {?string} value
* @param {*=} type
*/
Polymer_PropertyAccessors.prototype._attributeToProperty = function(attribute, value, type){};
/**
Expand All @@ -57,8 +57,8 @@ Polymer_PropertyAccessors.prototype._valueToNodeAttribute = function(node, value
*/
Polymer_PropertyAccessors.prototype._serializeValue = function(value){};
/**
* @param {string} value
* @param {*} type
* @param {?string} value
* @param {*=} type
* @return {*}
*/
Polymer_PropertyAccessors.prototype._deserializeValue = function(value, type){};
Expand Down Expand Up @@ -174,22 +174,22 @@ Polymer_PropertyEffects.prototype._addEventListenerToNode = function(node, event
*/
Polymer_PropertyEffects.prototype._removeEventListenerFromNode = function(node, eventName, handler){};
/**
* @param {*} name
* @param {*} old
* @param {*} value
* @param {string} name
* @param {?string} old
* @param {?string} value
*/
Polymer_PropertyEffects.prototype.attributeChangedCallback = function(name, old, value){};
/**
*/
Polymer_PropertyEffects.prototype._initializeProperties = function(){};
/**
* @override
* @param {*} props
* @param {Object} props
*/
Polymer_PropertyEffects.prototype._initializeProtoProperties = function(props){};
/**
* @override
* @param {*} props
* @param {Object} props
*/
Polymer_PropertyEffects.prototype._initializeInstanceProperties = function(props){};
/**
Expand All @@ -199,8 +199,8 @@ Polymer_PropertyEffects.prototype._initializeInstanceProperties = function(props
Polymer_PropertyEffects.prototype._ensureAttribute = function(attribute, value){};
/**
* @param {string} attribute
* @param {string} value
* @param {*} type
* @param {?string} value
* @param {*=} type
*/
Polymer_PropertyEffects.prototype._attributeToProperty = function(attribute, value, type){};
/**
Expand All @@ -221,8 +221,8 @@ Polymer_PropertyEffects.prototype._valueToNodeAttribute = function(node, value,
*/
Polymer_PropertyEffects.prototype._serializeValue = function(value){};
/**
* @param {string} value
* @param {*} type
* @param {?string} value
* @param {*=} type
* @return {*}
*/
Polymer_PropertyEffects.prototype._deserializeValue = function(value, type){};
Expand Down Expand Up @@ -490,8 +490,8 @@ Polymer_ElementMixin.prototype._removeEventListenerFromNode = function(node, eve
/**
* @override
* @param {string} name
* @param {string} old
* @param {string} value
* @param {?string} old
* @param {?string} value
*/
Polymer_ElementMixin.prototype.attributeChangedCallback = function(name, old, value){};
/**
Expand All @@ -500,12 +500,12 @@ Polymer_ElementMixin.prototype.attributeChangedCallback = function(name, old, va
Polymer_ElementMixin.prototype._initializeProperties = function(){};
/**
* @override
* @param {*} props
* @param {Object} props
*/
Polymer_ElementMixin.prototype._initializeProtoProperties = function(props){};
/**
* @override
* @param {*} props
* @param {Object} props
*/
Polymer_ElementMixin.prototype._initializeInstanceProperties = function(props){};
/**
Expand All @@ -515,8 +515,8 @@ Polymer_ElementMixin.prototype._initializeInstanceProperties = function(props){}
Polymer_ElementMixin.prototype._ensureAttribute = function(attribute, value){};
/**
* @param {string} attribute
* @param {string} value
* @param {*} type
* @param {?string} value
* @param {*=} type
*/
Polymer_ElementMixin.prototype._attributeToProperty = function(attribute, value, type){};
/**
Expand All @@ -537,8 +537,8 @@ Polymer_ElementMixin.prototype._valueToNodeAttribute = function(node, value, att
*/
Polymer_ElementMixin.prototype._serializeValue = function(value){};
/**
* @param {string} value
* @param {*} type
* @param {?string} value
* @param {*=} type
* @return {*}
*/
Polymer_ElementMixin.prototype._deserializeValue = function(value, type){};
Expand Down Expand Up @@ -847,8 +847,8 @@ Polymer_LegacyElementMixin.prototype._removeEventListenerFromNode = function(nod
/**
* @override
* @param {string} name
* @param {string} old
* @param {string} value
* @param {?string} old
* @param {?string} value
*/
Polymer_LegacyElementMixin.prototype.attributeChangedCallback = function(name, old, value){};
/**
Expand All @@ -857,12 +857,12 @@ Polymer_LegacyElementMixin.prototype.attributeChangedCallback = function(name, o
Polymer_LegacyElementMixin.prototype._initializeProperties = function(){};
/**
* @override
* @param {*} props
* @param {Object} props
*/
Polymer_LegacyElementMixin.prototype._initializeProtoProperties = function(props){};
/**
* @override
* @param {*} props
* @param {Object} props
*/
Polymer_LegacyElementMixin.prototype._initializeInstanceProperties = function(props){};
/**
Expand All @@ -872,8 +872,8 @@ Polymer_LegacyElementMixin.prototype._initializeInstanceProperties = function(pr
Polymer_LegacyElementMixin.prototype._ensureAttribute = function(attribute, value){};
/**
* @param {string} attribute
* @param {string} value
* @param {*} type
* @param {?string} value
* @param {*=} type
*/
Polymer_LegacyElementMixin.prototype._attributeToProperty = function(attribute, value, type){};
/**
Expand All @@ -894,8 +894,8 @@ Polymer_LegacyElementMixin.prototype._valueToNodeAttribute = function(node, valu
*/
Polymer_LegacyElementMixin.prototype._serializeValue = function(value){};
/**
* @param {string} value
* @param {*} type
* @param {?string} value
* @param {*=} type
* @return {*}
*/
Polymer_LegacyElementMixin.prototype._deserializeValue = function(value, type){};
Expand Down Expand Up @@ -1165,8 +1165,8 @@ Polymer_LegacyElementMixin.prototype.attached = function(){};
Polymer_LegacyElementMixin.prototype.detached = function(){};
/**
* @param {string} name
* @param {string} old
* @param {string} value
* @param {?string} old
* @param {?string} value
*/
Polymer_LegacyElementMixin.prototype.attributeChanged = function(name, old, value){};
/**
Expand Down
2 changes: 2 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ gulp.task('closure', ['clean'], () => {
rewrite_polyfills: false,
new_type_inf: true,
checks_only: CLOSURE_LINT_ONLY,
jscomp_warning: 'newCheckTypes',
jscomp_off: 'newCheckTypesExtraChecks',
externs: [
'bower_components/shadycss/externs/shadycss-externs.js',
'externs/webcomponents-externs.js',
Expand Down
8 changes: 4 additions & 4 deletions lib/legacy/legacy-element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
* Provides an override implementation of `attributeChangedCallback`
* which adds the Polymer legacy API's `attributeChanged` method.
* @param {string} name Name of attribute.
* @param {string} old Old value of attribute.
* @param {string} value Current value of attribute.
* @param {?string} old Old value of attribute.
* @param {?string} value Current value of attribute.
* @override
*/
attributeChangedCallback(name, old, value) {
Expand All @@ -131,8 +131,8 @@
* Legacy callback called during `attributeChangedChallback`, for overriding
* by the user.
* @param {string} name Name of attribute.
* @param {string} old Old value of attribute.
* @param {string} value Current value of attribute.
* @param {?string} old Old value of attribute.
* @param {?string} value Current value of attribute.
*/
attributeChanged(name, old, value) {} // eslint-disable-line no-unused-vars

Expand Down
19 changes: 12 additions & 7 deletions lib/mixins/element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
*
* @param {PolymerElement} proto Element class prototype to add accessors
* and effects to
* @param {HTMLTemplateElement} template Template to process and bind
* @param {!HTMLTemplateElement} template Template to process and bind
* @param {string} baseURI URL against which to resolve urls in
* style element cssText
* @param {string} is Tag name (or type extension name) for this element
Expand Down Expand Up @@ -573,6 +573,7 @@
* `properties` metadata.
*
* @override
* @suppress {invalidCasts}
*/
_initializeProperties() {
Polymer.telemetry.instanceCount++;
Expand All @@ -584,8 +585,8 @@
this._template.__polymerFinalized = true;
const baseURI =
importPath ? Polymer.ResolveUrl.resolveUrl(importPath) : '';
finalizeTemplate(this.__proto__, this._template, baseURI,
this.localName);
finalizeTemplate(/** @type {!PolymerElement} */(this.__proto__), this._template, baseURI,
/**@type {!HTMLElement}*/(this).localName);
}
super._initializeProperties();
// set path defaults
Expand Down Expand Up @@ -625,10 +626,11 @@
* when using the ShadyCSS scoping/custom properties polyfill.
*
* @override
* @suppress {invalidCasts}
*/
connectedCallback() {
if (window.ShadyCSS && this._template) {
window.ShadyCSS.styleElement(this);
window.ShadyCSS.styleElement(/** @type {!HTMLElement} */(this));
}
this._enableProperties();
}
Expand Down Expand Up @@ -695,6 +697,7 @@
this.shadowRoot.appendChild(dom);
return this.shadowRoot;
}
return null;
} else {
throw new Error('ShadowDOM not available. ' +
// TODO(sorvell): move to compile-time conditional when supported
Expand All @@ -713,8 +716,8 @@
* properties.
*
* @param {string} name Name of attribute.
* @param {string} old Old value of attribute.
* @param {string} value Current value of attribute.
* @param {?string} old Old value of attribute.
* @param {?string} value Current value of attribute.
* @override
*/
attributeChangedCallback(name, old, value) {
Expand Down Expand Up @@ -742,10 +745,11 @@
*
* @param {Object=} properties Bag of custom property key/values to
* apply to this element.
* @suppress {invalidCasts}
*/
updateStyles(properties) {
if (window.ShadyCSS) {
window.ShadyCSS.styleSubtree(this, properties);
window.ShadyCSS.styleSubtree(/** @type {!HTMLElement} */(this), properties);
}
}

Expand Down Expand Up @@ -807,6 +811,7 @@
/**
* @param {HTMLElement} prototype Element prototype to log
* @private
* @suppress {missingProperties}
*/
_regLog: function(prototype) {
console.log('[' + prototype.is + ']: registered')
Expand Down
19 changes: 17 additions & 2 deletions lib/mixins/property-effects.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@
* run.
*
* @param {Element} inst The instance the effect will be run on
* @param {Object} changedProps Bag of changed properties
* @param {Object} oldProps Bag of previous values for changed properties
* @param {!Object} changedProps Bag of changed properties
* @param {!Object} oldProps Bag of previous values for changed properties
* @param {boolean} hasPaths True with `props` contains one or more paths
* @private
*/
Expand Down Expand Up @@ -1099,6 +1099,7 @@
* the prototype on the instance.
*
* @override
* @param {Object} props Properties to initialize on the prototype
*/
_initializeProtoProperties(props) {
this.__data = Object.create(props);
Expand All @@ -1111,6 +1112,7 @@
* `_setProperty`'s `shouldNotify: true`.
*
* @override
* @param {Object} props Properties to initialize on the instance
*/
_initializeInstanceProperties(props) {
let readOnly = this.__readOnly;
Expand Down Expand Up @@ -1379,6 +1381,7 @@
}
return true;
}
return false;
}

/**
Expand Down Expand Up @@ -2565,17 +2568,29 @@

stack: [],

/**
* @param {*} inst Instance to add to hostStack
* @this {hostStack}
*/
registerHost(inst) {
if (this.stack.length) {
let host = this.stack[this.stack.length-1];
host._enqueueClient(inst);
}
},

/**
* @param {*} inst Instance to begin hosting
* @this {hostStack}
*/
beginHosting(inst) {
this.stack.push(inst);
},

/**
* @param {*} inst Instance to end hosting
* @this {hostStack}
*/
endHosting(inst) {
let stackLen = this.stack.length;
if (stackLen && this.stack[stackLen-1] == inst) {
Expand Down
1 change: 1 addition & 0 deletions lib/utils/mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* @param {T} mixin ES6 class expression mixin to wrap
* @return {T} Wrapped mixin that deduplicates and memoizes
* mixin applications to base
* @suppress {invalidCasts}
*/
Polymer.dedupingMixin = function(mixin) {
let mixinApplications = /** @type {!MixinFunction} */(mixin).__mixinApplications;
Expand Down
1 change: 1 addition & 0 deletions lib/utils/path.html
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
* @param {string | !Array<string|number>} path Input path
* @return {!Array<string>} Array of path parts
* @this {Path}
* @suppress {checkTypes}
*/
split: function(path) {
if (Array.isArray(path)) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"gulp-vulcanize": "^6.0.1",
"lazypipe": "^1.0.1",
"merge-stream": "^1.0.1",
"polymer-build": "1.1.x",
"polymer-build": "^1.5.0",
"run-sequence": "^1.1.0",
"through2": "^2.0.0",
"web-component-tester": "^6.0.0-prerelease.4"
Expand Down

0 comments on commit abc229e

Please sign in to comment.