mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
fix typings
This commit is contained in:
@@ -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(){}
|
||||
/**
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2
types/lib/mixins/disable-upgrade-mixin.d.ts
vendored
2
types/lib/mixins/disable-upgrade-mixin.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user