Skip to content

Commit

Permalink
Clean up closure externs
Browse files Browse the repository at this point in the history
Generated closure externs substantially reduced in size with newer
generator
  • Loading branch information
dfreedm committed Oct 9, 2017
1 parent 3b15517 commit 1e5ea94
Show file tree
Hide file tree
Showing 8 changed files with 1,538 additions and 2,627 deletions.
2,182 changes: 298 additions & 1,884 deletions externs/closure-types.js

Large diffs are not rendered by default.

157 changes: 0 additions & 157 deletions externs/polymer-closure-types.html

This file was deleted.

4 changes: 2 additions & 2 deletions externs/polymer-externs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @fileoverview Externs for Polymer
* @fileoverview Externs for Polymer Pass and external Polymer API
* @externs
*
* @license
Expand Down Expand Up @@ -101,4 +101,4 @@ Polymer.telemetry;
* @extends {HTMLElement}
* @implements {Polymer_LegacyElementMixin}
*/
var PolymerElement = Polymer.LegacyElementMixin();
let PolymerElement = Polymer.LegacyElementMixin();
158 changes: 158 additions & 0 deletions externs/polymer-internal-shared-types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
/**
* @fileoverview Internal shared types for Polymer
*
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* 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
*/

/* eslint-disable no-unused-vars, strict, valid-jsdoc */

/**
* @constructor
* @extends {DocumentFragment}
*/
function StampedTemplate() { }
/** @type {boolean} */
StampedTemplate.prototype.__noInsertionPoint;
/** @type {!Array<!Node>} */
StampedTemplate.prototype.nodeList;
/** @type {!Object<string, !Node>} */
StampedTemplate.prototype.$;
/** @type {!TemplateInfo | undefined} */
StampedTemplate.prototype.templateInfo;

/** @interface */
function NodeInfo() { }
/** @type {string} */
NodeInfo.prototype.id;
/** @type {!Array<{name: string, value: string}>}*/
NodeInfo.prototype.events;
/** @type {boolean} */
NodeInfo.prototype.hasInsertionPoint;
/** @type {!TemplateInfo} */
NodeInfo.prototype.templateInfo;
/** @type {!NodeInfo} */
NodeInfo.prototype.parentInfo;
/** @type {number} */
NodeInfo.prototype.parentIndex;
/** @type {number} */
NodeInfo.prototype.infoIndex;
/** @type {!Array<!Binding>} */
NodeInfo.prototype.bindings;

/** @interface */
function TemplateInfo() { }
/** @type {!Array<!NodeInfo>} */
TemplateInfo.prototype.nodeInfoList;
/** @type {!Array<!Node>} */
TemplateInfo.prototype.nodeList;
/** @type {boolean} */
TemplateInfo.prototype.stripWhitespace;
/** @type {boolean | undefined} */
TemplateInfo.prototype.hasInsertionPoint;
/** @type {!Object} */
TemplateInfo.prototype.hostProps;
/** @type {!Object} */
TemplateInfo.prototype.propertyEffects;
/** @type {TemplateInfo | undefined} */
TemplateInfo.prototype.nextTemplateInfo;
/** @type {TemplateInfo | undefined} */
TemplateInfo.prototype.previousTemplateInfo;
/** @type {!Array<!Node>} */
TemplateInfo.prototype.childNodes;
/** @type {boolean} */
TemplateInfo.prototype.wasPreBound;

/**
* type for HTMLTemplateElement with `_templateInfo`
*
* @constructor
* @extends {HTMLTemplateElement}
*/
function HTMLTemplateElementWithInfo() { }
/** @type {TemplateInfo} */
HTMLTemplateElementWithInfo.prototype._templateInfo;

/**
* @typedef {{
* literal: string,
* compoundIndex: (number | undefined)
* }}
*/
let LiteralBindingPart;

/**
* @typedef {{
* literal: boolean,
* name: string,
* value: (string | number),
* rootProperty: (string | undefined),
* structured: (boolean | undefined),
* wildcard: (boolean | undefined)
* }}
*/
let MethodArg;

/**
* @typedef {{
* methodName: string,
* static: boolean,
* args: !Array<!MethodArg>,
* dynamicFn: (boolean | undefined),
* }}
*/
let MethodSignature;

/**
* @typedef {{
* mode: string,
* negate: boolean,
* source: string,
* dependencies: !Array<(!MethodArg|string)>,
* customEvent: boolean,
* signature: Object,
* event: string
* }}
*/
let ExpressionBindingPart;

/**
* @typedef {LiteralBindingPart | ExpressionBindingPart}
*/
let BindingPart;

/**
* @typedef {{
* kind: string,
* target: string,
* parts: Array<!BindingPart>,
* literal: (string | undefined),
* isCompound: boolean,
* listenerEvent: (string | undefined),
* listenerNegate: (boolean | undefined)
* }}
*/
let Binding;

/**
* @typedef {{
* path: string
* }}
*/
let PathInfo;

/**
* @typedef {{
* forwardHostProp: (function(string, *) | undefined),
* instanceProps: (Object | undefined),
* mutableData: (boolean | undefined),
* notifyInstanceProp: (function(*, string, *) | undefined),
* parentModel: (boolean | undefined)
* }}
*/
let TemplatizeOptions;
11 changes: 11 additions & 0 deletions externs/polymer-internal-types.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
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
-->
<!-- internal shared types for closure pass -->
<script src="polymer-internal-shared-types.js"></script>
Loading

0 comments on commit 1e5ea94

Please sign in to comment.