Skip to content

Commit

Permalink
fix typings
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Feb 21, 2018
1 parent 7e74e36 commit 8f8135b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion externs/closure-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(){}
/**
Expand Down
2 changes: 1 addition & 1 deletion lib/elements/dom-if.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
// 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(() => {
Expand Down
2 changes: 1 addition & 1 deletion lib/elements/dom-repeat.html
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
// 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(() => {
Expand Down
6 changes: 3 additions & 3 deletions lib/mixins/disable-upgrade-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@
*
* @mixinFunction
* @polymer
* @appliesMixin Polymer.PropertiesChanged
* @appliesMixin Polymer.ElementMixin
* @memberof Polymer
*/
Polymer.DisableUpgradeMixin = Polymer.dedupingMixin((base) => {

/**
* @constructor
* @extends {base}
* @implements {Polymer_PropertiesMixin}
* @implements {Polymer_ElementMixin}
*/
const superClass = Polymer.PropertiesMixin(base);
const superClass = Polymer.ElementMixin(base);
/**
* @polymer
* @mixinClass
Expand Down
2 changes: 1 addition & 1 deletion lib/mixins/properties-changed.html
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
* @return {boolean} true if changedProps is truthy
*/
_shouldPropertiesChange(currentProps, changedProps, oldProps) { // eslint-disable-line no-unused-vars
return changedProps;
return Boolean(changedProps);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion types/lib/mixins/disable-upgrade-mixin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8f8135b

Please sign in to comment.