Skip to content

Commit

Permalink
Annotate some internal classes as private.
Browse files Browse the repository at this point in the history
  • Loading branch information
aomarks committed Jul 21, 2018
1 parent a0a6c6b commit fa58519
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/elements/array-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ let ArraySelectorMixin = dedupingMixin(superClass => {
* @constructor
* @extends {superClass}
* @implements {Polymer_ElementMixin}
* @private
*/
let elementBase = ElementMixin(superClass);

Expand Down
1 change: 1 addition & 0 deletions lib/legacy/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ function flattenBehaviors(behaviors, list, exclude) {
*/
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.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const LegacyElementMixin = dedupingMixin((base) => {
* @implements {Polymer_ElementMixin}
* @implements {Polymer_GestureEventListeners}
* @implements {Polymer_DirMixin}
* @private
*/
const legacyElementBase = DirMixin(GestureEventListeners(ElementMixin(base)));

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

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

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

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

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

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

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

Expand Down
1 change: 1 addition & 0 deletions lib/utils/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ let dedupeId = 0;
/**
* @constructor
* @extends {Function}
* @private
*/
function MixinFunction(){}
/** @type {(WeakMap | undefined)} */
Expand Down
10 changes: 9 additions & 1 deletion lib/utils/templatize.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ import { MutableData } from '../mixins/mutable-data.js';
// 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 @@ -28,16 +30,20 @@ HTMLTemplateElementExtension.prototype = Object.create(HTMLTemplateElement.proto
writable: true
}
});

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

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

Expand All @@ -49,8 +55,8 @@ function upgradeTemplate(template, constructor) {
newInstance = null;
}

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

Expand Down Expand Up @@ -307,6 +314,7 @@ function addPropagateEffects(template, templateInfo, options) {
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

0 comments on commit fa58519

Please sign in to comment.