fix typings

This commit is contained in:
Daniel Freedman
2018-02-21 12:52:00 -08:00
parent 7e74e363ff
commit 8f8135b2de
6 changed files with 8 additions and 8 deletions

View File

@@ -1377,7 +1377,7 @@ Polymer_ArraySelectorMixin.prototype.select = function(item){};
Polymer_ArraySelectorMixin.prototype.selectIndex = function(idx){};
/**
* @interface
* @extends {Polymer_PropertiesChanged}
* @extends {Polymer_ElementMixin}
*/
function Polymer_DisableUpgradeMixin(){}
/**

View File

@@ -179,7 +179,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// Guard against element being detached while render was queued
if (parentNode) {
if (!this.__ctor) {
let template = this.querySelector('template');
let template = /** @type {HTMLTemplateElement} */(this.querySelector('template'));
if (!template) {
// Wait until childList changes and template should be there by then
let observer = new MutationObserver(() => {

View File

@@ -335,7 +335,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// until ready, since won't have its template content handed back to
// it until then
if (!this.__ctor) {
let template = this.template = this.querySelector('template');
let template = this.template = /** @type {HTMLTemplateElement} */(this.querySelector('template'));
if (!template) {
// // Wait until childList changes and template should be there by then
let observer = new MutationObserver(() => {

View File

@@ -35,7 +35,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
*
* @mixinFunction
* @polymer
* @appliesMixin Polymer.PropertiesChanged
* @appliesMixin Polymer.ElementMixin
* @memberof Polymer
*/
Polymer.DisableUpgradeMixin = Polymer.dedupingMixin((base) => {
@@ -43,9 +43,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
/**
* @constructor
* @extends {base}
* @implements {Polymer_PropertiesMixin}
* @implements {Polymer_ElementMixin}
*/
const superClass = Polymer.PropertiesMixin(base);
const superClass = Polymer.ElementMixin(base);
/**
* @polymer
* @mixinClass

View File

@@ -355,7 +355,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @return {boolean} true if changedProps is truthy
*/
_shouldPropertiesChange(currentProps, changedProps, oldProps) { // eslint-disable-line no-unused-vars
return changedProps;
return Boolean(changedProps);
}
/**

View File

@@ -31,7 +31,7 @@ declare namespace Polymer {
*
* MyClass = Polymer.DisableUpgradeMixin(class extends BaseClass {...});
*/
function DisableUpgradeMixin<T extends new (...args: any[]) => {}>(base: T): T & DisableUpgradeMixinConstructor & Polymer.PropertiesChangedConstructor;
function DisableUpgradeMixin<T extends new (...args: any[]) => {}>(base: T): T & DisableUpgradeMixinConstructor & Polymer.ElementMixinConstructor & Polymer.PropertyEffectsConstructor & Polymer.TemplateStampConstructor & Polymer.PropertyAccessorsConstructor & Polymer.PropertiesChangedConstructor & Polymer.PropertiesMixinConstructor;
interface DisableUpgradeMixinConstructor {
new(...args: any[]): DisableUpgradeMixin;