mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Add some casts for places Closure doesn't understand constructor
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user