Skip to content

Commit

Permalink
Get typescript compiling again.
Browse files Browse the repository at this point in the history
  • Loading branch information
rictic committed Nov 10, 2018
1 parent 419dce6 commit bbf24c0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
6 changes: 5 additions & 1 deletion gen-tsd.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"util/**",
"index.html"
],
"excludeIdentifiers": [
"templatizedBase"
],
"removeReferences": [
"../shadycss/apply-shim.d.ts",
"../shadycss/custom-style-interface.d.ts"
Expand All @@ -32,7 +35,8 @@
"Binding",
"AsyncInterface",
"GestureRecognizer",
"IdleDeadline"
"IdleDeadline",
"PolymerElementConstructor"
],
"./lib/utils/debounce.js": [
"Debouncer"
Expand Down
9 changes: 9 additions & 0 deletions interfaces.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,12 @@ export interface IdleDeadline {
didTimeout: boolean;
timeRemaining(): number;
}

export interface PolymerElementConstructor {
new (): HTMLElement;
is?: string;
extends?: string;
properties?: PolymerElementProperties;
observers?: string[];
template?: string|HTMLTemplateElement|null;
}
2 changes: 1 addition & 1 deletion lib/mixins/property-effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ export const PropertyEffects = dedupingMixin(superClass => {
* the prototype on the instance.
*
* @override
* @param {Object} props Properties to initialize on the prototype
* @param {!Object} props Properties to initialize on the prototype
* @return {void}
*/
_initializeProtoProperties(props) {
Expand Down
12 changes: 6 additions & 6 deletions lib/utils/templatize.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ function upgradeTemplate(template, constructor) {
* @implements {Polymer_PropertyEffects}
* @private
*/
const base = PropertyEffects(class {});
const templateInstanceBase = PropertyEffects(class {});

/**
* @polymer
* @customElement
* @appliesMixin PropertyEffects
* @unrestricted
*/
class TemplateInstanceBase extends base {
class TemplateInstanceBase extends templateInstanceBase {
constructor(props) {
super();
this._configureProperties(props);
Expand Down Expand Up @@ -335,14 +335,14 @@ function createTemplatizerClass(template, templateInfo, options) {
* @constructor
* @extends {TemplateInstanceBase}
*/
let base = options.mutableData ?
let templatizerBase = options.mutableData ?
MutableTemplateInstanceBase : TemplateInstanceBase;
/**
* Anonymous class created by the templatize
* @constructor
* @private
*/
let klass = class extends base { };
let klass = class extends templatizerBase { };
/** @override */
klass.prototype.__templatizeOptions = options;
klass.prototype._bindTemplate(template);
Expand All @@ -363,10 +363,10 @@ function addPropagateEffects(template, templateInfo, options) {
* @constructor
* @extends {DataTemplate}
*/
let base = options.mutableData ? MutableDataTemplate : DataTemplate;
let templatizedBase = options.mutableData ? MutableDataTemplate : DataTemplate;
/** @private */
klass = templateInfo.templatizeTemplateClass =
class TemplatizedTemplate extends base {};
class TemplatizedTemplate extends templatizedBase {};
// Add template - >instances effects
// and host <- template effects
let hostProps = templateInfo.hostProps;
Expand Down

0 comments on commit bbf24c0

Please sign in to comment.