Skip to content

Commit

Permalink
Updates for improved type generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
aomarks committed Jul 21, 2018
1 parent 654f904 commit 748db7c
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 11 deletions.
1 change: 1 addition & 0 deletions lib/elements/array-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* @constructor
* @extends {superClass}
* @implements {Polymer_ElementMixin}
* @private
*/
let elementBase = Polymer.ElementMixin(superClass);

Expand Down
1 change: 1 addition & 0 deletions lib/legacy/class.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
*/
function GenerateClassFromInfo(info, Base) {

/** @private */
class PolymerGenerated extends Base {

static get properties() {
Expand Down
1 change: 1 addition & 0 deletions lib/legacy/legacy-element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
* @implements {Polymer_ElementMixin}
* @implements {Polymer_GestureEventListeners}
* @implements {Polymer_DirMixin}
* @private
*/
const legacyElementBase = Polymer.DirMixin(Polymer.GestureEventListeners(Polymer.ElementMixin(base)));

Expand Down
1 change: 1 addition & 0 deletions lib/mixins/dir-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
* @constructor
* @extends {base}
* @implements {Polymer_PropertyAccessors}
* @private
*/
const elementBase = Polymer.PropertyAccessors(base);

Expand Down
2 changes: 2 additions & 0 deletions lib/mixins/disable-upgrade-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
* @constructor
* @extends {base}
* @implements {Polymer_ElementMixin}
* @private
*/
const superClass = Polymer.ElementMixin(base);

/**
* @polymer
* @mixinClass
Expand Down
1 change: 1 addition & 0 deletions lib/mixins/element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
* @extends {base}
* @implements {Polymer_PropertyEffects}
* @implements {Polymer_PropertiesMixin}
* @private
*/
const polymerElementBase = Polymer.PropertiesMixin(Polymer.PropertyEffects(base));

Expand Down
1 change: 1 addition & 0 deletions lib/mixins/properties-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
* @constructor
* @extends {superClass}
* @implements {Polymer_PropertiesChanged}
* @private
*/
const base = Polymer.PropertiesChanged(superClass);

Expand Down
1 change: 1 addition & 0 deletions lib/mixins/property-accessors.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
* @extends {superClass}
* @implements {Polymer_PropertiesChanged}
* @unrestricted
* @private
*/
const base = Polymer.PropertiesChanged(superClass);

Expand Down
1 change: 1 addition & 0 deletions lib/mixins/property-effects.html
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,7 @@
* @implements {Polymer_PropertyAccessors}
* @implements {Polymer_TemplateStamp}
* @unrestricted
* @private
*/
const propertyEffectsBase = Polymer.TemplateStamp(Polymer.PropertyAccessors(superClass));

Expand Down
1 change: 1 addition & 0 deletions lib/mixins/strict-binding-parser.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
* @constructor
* @extends {base}
* @implements {Polymer_PropertyEffects}
* @private
*/
const elementBase = Polymer.PropertyEffects(base);

Expand Down
1 change: 1 addition & 0 deletions lib/utils/mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/**
* @constructor
* @extends {Function}
* @private
*/
function MixinFunction(){}
/** @type {(WeakMap | undefined)} */
Expand Down
10 changes: 9 additions & 1 deletion lib/utils/templatize.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
// class only because Babel (incorrectly) requires super() in the class
// constructor even though no `this` is used and it returns an instance.
let newInstance = null;

/**
* @constructor
* @extends {HTMLTemplateElement}
* @private
*/
function HTMLTemplateElementExtension() { return newInstance; }
HTMLTemplateElementExtension.prototype = Object.create(HTMLTemplateElement.prototype, {
Expand All @@ -32,16 +34,20 @@
writable: true
}
});

/**
* @constructor
* @implements {Polymer_PropertyEffects}
* @extends {HTMLTemplateElementExtension}
* @private
*/
const DataTemplate = Polymer.PropertyEffects(HTMLTemplateElementExtension);

/**
* @constructor
* @implements {Polymer_MutableData}
* @extends {DataTemplate}
* @private
*/
const MutableDataTemplate = Polymer.MutableData(DataTemplate);

Expand All @@ -53,8 +59,8 @@
newInstance = null;
}

// Base class for TemplateInstance's
/**
* Base class for TemplateInstance.
* @constructor
* @implements {Polymer_PropertyEffects}
*/
Expand Down Expand Up @@ -268,6 +274,7 @@
* @constructor
* @extends {TemplateInstanceBase}
* @implements {Polymer_MutableData}
* @private
*/
const MutableTemplateInstanceBase = Polymer.MutableData(TemplateInstanceBase);

Expand Down Expand Up @@ -311,6 +318,7 @@
let klass = templateInfo.templatizeTemplateClass;
if (!klass) {
let base = options.mutableData ? MutableDataTemplate : DataTemplate;
/** @private */
klass = templateInfo.templatizeTemplateClass =
class TemplatizedTemplate extends base {};
// Add template - >instances effects
Expand Down
13 changes: 3 additions & 10 deletions polymer-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,18 @@
* and property change observation.
*
* @customElement
* @polymer
* @memberof Polymer
* @constructor
* @implements {Polymer_ElementMixin}
* @extends HTMLElement
* @extends {HTMLElement}
* @appliesMixin Polymer.ElementMixin
* @summary Custom element base class that provides the core API for Polymer's
* key meta-programming features including template stamping, data-binding,
* attribute deserialization, and property change observation
*/
const Element = Polymer.ElementMixin(HTMLElement);
/**
* @constructor
* @implements {Polymer_ElementMixin}
* @extends {HTMLElement}
*/
Polymer.Element = Element;
Polymer.Element = Polymer.ElementMixin(HTMLElement);

// NOTE: this is here for modulizer to export `html` for the module version of this file
Polymer.html = Polymer.html;
})();
</script>
</script>

0 comments on commit 748db7c

Please sign in to comment.