Get Polymer compiling clean under closure recommended flags

With these changes we have zero errors and zero warnings with `RECOMMENDED_FLAGS`!

Most of the changes were adding `@override` for methods and properties in mixins. Apparently if you implement an interface you need to say `@override` for each method or property on the interface. This combines with our mixin strategy to the tune of needing to add `@override` on every non-private method and property.

I'm not sure this is intended behavior of the compiler. Filed https://github.com/google/closure-compiler/issues/3137 to see if it is.
This commit is contained in:
Peter Burns
2018-11-04 13:29:04 -08:00
parent 5341dbd298
commit 566dcfaefe
12 changed files with 337 additions and 170 deletions

View File

@@ -48,6 +48,7 @@ PolymerInit.prototype.hostAttributes;
/** @type {(!Object<string, string> | undefined)} */
PolymerInit.prototype.listeners;
/** @record */
let PolymerElementConstructor = function () {};
/** @type {(string | undefined)} */
PolymerElementConstructor.is;
@@ -78,6 +79,26 @@ function Polymer(init){}
*/
Polymer.sanitizeDOMValue;
/**
* @type {boolean}
*/
Polymer.passiveTouchGestures;
/**
* @type {boolean}
*/
Polymer.strictTemplatePolicy;
/**
* @type {boolean}
*/
Polymer.allowTemplateFromDomModule;
/**
* @type {string}
*/
Polymer.rootPath;
/**
* @param {string} string
* @param {Object} obj
@@ -174,7 +195,7 @@ var PolymerDeepPropertyChange;
* @constructor
* @template T
*/
let DomRepeatEvent = function() {};
var DomRepeatEvent = function() {};
/**
* @type {{