From 10d43ce8495156b754c751735f3a57981eb1312e Mon Sep 17 00:00:00 2001 From: Alexander Marks Date: Mon, 3 Jun 2019 13:54:47 -0700 Subject: [PATCH] Add some casts for places Closure doesn't understand constructor --- lib/utils/templatize.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/utils/templatize.js b/lib/utils/templatize.js index 7d4ed9dd3f..ff488c15d9 100644 --- a/lib/utils/templatize.js +++ b/lib/utils/templatize.js @@ -101,7 +101,10 @@ function upgradeTemplate(template, constructor) { * @implements {Polymer_PropertyEffects} * @private */ -const templateInstanceBase = PropertyEffects(class {}); +const templateInstanceBase = PropertyEffects( + // This cast shouldn't be neccessary, but Closure doesn't understand that + // "class {}" is a constructor function. + /** @type {function(new:Object)} */(class {})); /** * @polymer @@ -317,7 +320,10 @@ TemplateInstanceBase.prototype.__hostProps; * @implements {Polymer_MutableData} * @private */ -const MutableTemplateInstanceBase = MutableData(TemplateInstanceBase); +const MutableTemplateInstanceBase = MutableData( + // This cast shouldn't be necessary, but Closure doesn't seem to understand + // this constructor. + /** @type {function(new:TemplateInstanceBase)} */(TemplateInstanceBase)); function findMethodHost(template) { // Technically this should be the owner of the outermost template.