Skip to content

Commit

Permalink
Add closure types
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Jul 19, 2019
1 parent 9b87d56 commit 6914078
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions lib/legacy/legacy-element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,31 @@ let styleInterface = window.ShadyCSS;
* @polymer
* @appliesMixin ElementMixin
* @appliesMixin GestureEventListeners
* @appliesMixin DirMixin
* @property isAttached {boolean} Set to `true` in this element's
* `connectedCallback` and `false` in `disconnectedCallback`
* @summary Element class mixin that provides Polymer's "legacy" API
*/
export const LegacyElementMixin = dedupingMixin((base) => {

// TODO(kschaaf): Note, the `@implements {Polymer_DirMixin}` is required here
// (rather than on legacyElementBase) for unknown reasons.
/**
* @constructor
* @implements {Polymer_ElementMixin}
* @implements {Polymer_GestureEventListeners}
* @implements {Polymer_DirMixin}
* @extends {HTMLElement}
* @private
*/
const GesturesElement = GestureEventListeners(ElementMixin(base));

// Note, the DirMixin does nothing if css is built so avoid including it
// in that case.

/**
* @constructor
* @implements {Polymer_ElementMixin}
* @implements {Polymer_GestureEventListeners}
* @implements {Polymer_DirMixin}
* @extends {HTMLElement}
* @extends {GesturesElement}
* @private
*/
const legacyElementBase = builtCSS ? GesturesElement :
Expand Down

0 comments on commit 6914078

Please sign in to comment.