Skip to content

Commit

Permalink
Tweaks to make Polymer 3 more amenable to typings generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
aomarks committed Jul 21, 2018
1 parent 4f0337a commit 605c891
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
4 changes: 1 addition & 3 deletions lib/elements/dom-repeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
*/
import { PolymerElement } from '../../polymer-element.js';

import { TemplateInstanceBase as TemplateInstanceBase$0, templatize, modelForElement as modelForElement$0 } from '../utils/templatize.js';
import { TemplateInstanceBase, templatize, modelForElement as modelForElement$0 } from '../utils/templatize.js';
import { Debouncer } from '../utils/debounce.js';
import { enqueueDebouncer, flush } from '../utils/flush.js';
import { OptionalMutableData } from '../mixins/mutable-data.js';
import { matches, translate } from '../utils/path.js';
import { timeOut, microTask } from '../utils/async.js';

let TemplateInstanceBase = TemplateInstanceBase$0; // eslint-disable-line

/**
* @constructor
* @implements {Polymer_OptionalMutableData}
Expand Down
6 changes: 3 additions & 3 deletions lib/legacy/legacy-element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ export const LegacyElementMixin = dedupingMixin((base) => {
*/
getEffectiveChildNodes() {
const thisEl = /** @type {Element} */ (this);
const domApi = /** @type {Polymer.DomApi} */(dom$0(thisEl));
const domApi = /** @type {DomApi} */(dom$0(thisEl));
return domApi.getEffectiveChildNodes();
}

Expand All @@ -529,7 +529,7 @@ export const LegacyElementMixin = dedupingMixin((base) => {
*/
queryDistributedElements(selector) {
const thisEl = /** @type {Element} */ (this);
const domApi = /** @type {Polymer.DomApi} */(dom$0(thisEl));
const domApi = /** @type {DomApi} */(dom$0(thisEl));
return domApi.queryDistributedElements(selector);
}

Expand Down Expand Up @@ -601,7 +601,7 @@ export const LegacyElementMixin = dedupingMixin((base) => {
*/
getContentChildNodes(slctr) {
let content = this.root.querySelector(slctr || 'slot');
return content ? /** @type {Polymer.DomApi} */(dom$0(content)).getDistributedNodes() : [];
return content ? /** @type {DomApi} */(dom$0(content)).getDistributedNodes() : [];
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/legacy/polymer.dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class DomApi {
*
* @param {function(!Element, { target: !Element, addedNodes: !Array<!Element>, removedNodes: !Array<!Element> }):void} callback Called when direct or distributed children
* of this element changes
* @return {!Polymer.FlattenedNodesObserver} Observer instance
* @return {!FlattenedNodesObserver} Observer instance
*/
observeNodes(callback) {
return new FlattenedNodesObserver(this.node, callback);
Expand All @@ -62,7 +62,7 @@ export class DomApi {
/**
* Disconnects an observer previously created via `observeNodes`
*
* @param {!Polymer.FlattenedNodesObserver} observerHandle Observer instance
* @param {!FlattenedNodesObserver} observerHandle Observer instance
* to disconnect.
* @return {void}
*/
Expand Down
4 changes: 1 addition & 3 deletions lib/legacy/templatizer-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { TemplateInstanceBase as TemplateInstanceBase$0, templatize as templatize$0, modelForElement as modelForElement$0 } from '../utils/templatize.js';

let TemplateInstanceBase = TemplateInstanceBase$0; // eslint-disable-line
import { TemplateInstanceBase, templatize as templatize$0, modelForElement as modelForElement$0 } from '../utils/templatize.js';

/**
* @typedef {{
Expand Down

0 comments on commit 605c891

Please sign in to comment.