diff --git a/externs/.gitignore b/externs/.gitignore index 33522114ba..6233b5b960 100644 --- a/externs/.gitignore +++ b/externs/.gitignore @@ -2,3 +2,4 @@ # * !.gitignore !.npmignore +closure-types.js diff --git a/externs/closure-types.js b/externs/closure-types.js deleted file mode 100644 index bc57da9291..0000000000 --- a/externs/closure-types.js +++ /dev/null @@ -1,1415 +0,0 @@ -/** - * @fileoverview Generated typings for Polymer mixins - * @externs - * - * @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 */ -/** -* @interface -*/ -function Polymer_PropertiesChanged(){} -/** -* @param {string} property Name of the property -* @param {boolean=} readOnly When true, no setter is created; the - protected `_setProperty` function must be used to set the property -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._createPropertyAccessor = function(property, readOnly){}; -/** -* @param {string} property Name of the property -*/ -Polymer_PropertiesChanged.prototype._addPropertyToAttributeMap = function(property){}; -/** -* @param {string} property Name of the property -* @param {boolean=} readOnly When true, no setter is created -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._definePropertyAccessor = function(property, readOnly){}; -/** -* @return {void} -*/ -Polymer_PropertiesChanged.prototype.ready = function(){}; -/** -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._initializeProperties = function(){}; -/** -* @param {Object} props Bag of property values that were overwritten - when creating property accessors. -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._initializeInstanceProperties = function(props){}; -/** -* @param {string} property Name of the property -* @param {*} value Value to set -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._setProperty = function(property, value){}; -/** -* @param {string} property Name of property -* @return {*} -*/ -Polymer_PropertiesChanged.prototype._getProperty = function(property){}; -/** -* @param {string} property Name of the property -* @param {*} value Value to set -* @param {boolean=} ext Not used here; affordance for closure -* @return {boolean} -*/ -Polymer_PropertiesChanged.prototype._setPendingProperty = function(property, value, ext){}; -/** -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._invalidateProperties = function(){}; -/** -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._enableProperties = function(){}; -/** -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._flushProperties = function(){}; -/** -* @param {!Object} currentProps Bag of all current accessor values -* @param {!Object} changedProps Bag of properties changed since the last - call to `_propertiesChanged` -* @param {!Object} oldProps Bag of previous values for each property - in `changedProps` -* @return {boolean} -*/ -Polymer_PropertiesChanged.prototype._shouldPropertiesChange = function(currentProps, changedProps, oldProps){}; -/** -* @param {!Object} currentProps Bag of all current accessor values -* @param {!Object} changedProps Bag of properties changed since the last - call to `_propertiesChanged` -* @param {!Object} oldProps Bag of previous values for each property - in `changedProps` -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._propertiesChanged = function(currentProps, changedProps, oldProps){}; -/** -* @param {string} property Property name -* @param {*} value New property value -* @param {*} old Previous property value -* @return {boolean} -*/ -Polymer_PropertiesChanged.prototype._shouldPropertyChange = function(property, value, old){}; -/** -* @param {string} name Name of attribute that changed -* @param {?string} old Old attribute value -* @param {?string} value New attribute value -* @param {?string} namespace Namespace of the attribute -* @return {void} -*/ -Polymer_PropertiesChanged.prototype.attributeChangedCallback = function(name, old, value, namespace){}; -/** -* @param {string} attribute Name of attribute to deserialize. -* @param {?string} value of the attribute. -* @param {*=} type type to deserialize to, defaults to the value -returned from `typeForProperty` -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._attributeToProperty = function(attribute, value, type){}; -/** -* @param {string} property Property name to reflect. -* @param {string=} attribute Attribute name to reflect to. -* @param {*=} value Property value to refect. -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._propertyToAttribute = function(property, attribute, value){}; -/** -* @param {Element} node Element to set attribute to. -* @param {*} value Value to serialize. -* @param {string} attribute Attribute name to serialize to. -* @return {void} -*/ -Polymer_PropertiesChanged.prototype._valueToNodeAttribute = function(node, value, attribute){}; -/** -* @param {*} value Property value to serialize. -* @return {(string | undefined)} -*/ -Polymer_PropertiesChanged.prototype._serializeValue = function(value){}; -/** -* @param {?string} value Value to deserialize. -* @param {*=} type Type to deserialize the string to. -* @return {*} -*/ -Polymer_PropertiesChanged.prototype._deserializeValue = function(value, type){}; -/** -* @param {!Object} props Object whose keys are names of accessors. -* @return {void} -*/ -Polymer_PropertiesChanged.createProperties = function(props){}; -/** -* @param {string} property Property to convert -* @return {string} -*/ -Polymer_PropertiesChanged.attributeNameForProperty = function(property){}; -/** -* @param {string} name Name of property -*/ -Polymer_PropertiesChanged.typeForProperty = function(name){}; -/** -* @interface -* @extends {Polymer_PropertiesChanged} -*/ -function Polymer_PropertyAccessors(){} -/** -* @param {string} property Name of the property -* @param {boolean=} readOnly When true, no setter is created - -When calling on a prototype, any overwritten values are saved in -`__dataProto`, and it is up to the subclasser to decide how/when -to set those properties back into the accessor. When calling on an -instance, the overwritten value is set via `_setPendingProperty`, -and the user should call `_invalidateProperties` or `_flushProperties` -for the values to take effect. -* @return {void} -*/ -Polymer_PropertyAccessors.prototype._definePropertyAccessor = function(property, readOnly){}; -/** -* @return {void} -*/ -Polymer_PropertyAccessors.prototype._initializeProperties = function(){}; -/** -* @param {*} value Property value to serialize. -* @return {(string | undefined)} -*/ -Polymer_PropertyAccessors.prototype._serializeValue = function(value){}; -/** -* @param {?string} value Attribute value to deserialize. -* @param {*=} type Type to deserialize the string to. -* @return {*} -*/ -Polymer_PropertyAccessors.prototype._deserializeValue = function(value, type){}; -/** -* @param {Object} props Bag of property values that were overwritten - when creating property accessors. -* @return {void} -*/ -Polymer_PropertyAccessors.prototype._initializeProtoProperties = function(props){}; -/** -* @param {string} attribute Name of attribute to ensure is set. -* @param {string} value of the attribute. -* @return {void} -*/ -Polymer_PropertyAccessors.prototype._ensureAttribute = function(attribute, value){}; -/** -* @param {string} property Property name -* @return {boolean} -*/ -Polymer_PropertyAccessors.prototype._hasAccessor = function(property){}; -/** -* @param {string} prop Property name -* @return {boolean} -*/ -Polymer_PropertyAccessors.prototype._isPropertyPending = function(prop){}; -/** -* @param {string} property Property to convert -* @return {string} -*/ -Polymer_PropertyAccessors.attributeNameForProperty = function(property){}; -/** -* @return {void} -*/ -Polymer_PropertyAccessors.createPropertiesForAttributes = function(){}; -/** -* @interface -*/ -function Polymer_TemplateStamp(){} -/** -* @param {!HTMLTemplateElement} template Template to stamp -* @return {!StampedTemplate} -*/ -Polymer_TemplateStamp.prototype._stampTemplate = function(template){}; -/** -* @param {!Node} node Node to add listener on -* @param {string} eventName Name of event -* @param {string} methodName Name of method -* @param {*=} context Context the method will be called on (defaults - to `node`) -* @return {Function} -*/ -Polymer_TemplateStamp.prototype._addMethodEventListenerToNode = function(node, eventName, methodName, context){}; -/** -* @param {!Node} node Node to add event listener to -* @param {string} eventName Name of event -* @param {function (!Event): void} handler Listener function to add -* @return {void} -*/ -Polymer_TemplateStamp.prototype._addEventListenerToNode = function(node, eventName, handler){}; -/** -* @param {!Node} node Node to remove event listener from -* @param {string} eventName Name of event -* @param {function (!Event): void} handler Listener function to remove -* @return {void} -*/ -Polymer_TemplateStamp.prototype._removeEventListenerFromNode = function(node, eventName, handler){}; -/** -* @param {!HTMLTemplateElement} template Template to parse -* @param {TemplateInfo=} outerTemplateInfo Template metadata from the outer - template, for parsing nested templates -* @return {!TemplateInfo} -*/ -Polymer_TemplateStamp._parseTemplate = function(template, outerTemplateInfo){}; -/** -* @param {*} template -* @param {*} templateInfo -* @param {*} nodeInfo -*/ -Polymer_TemplateStamp._parseTemplateContent = function(template, templateInfo, nodeInfo){}; -/** -* @param {Node} node Node to parse -* @param {!TemplateInfo} templateInfo Template metadata for current template -* @param {!NodeInfo} nodeInfo Node metadata for current template. -* @return {boolean} -*/ -Polymer_TemplateStamp._parseTemplateNode = function(node, templateInfo, nodeInfo){}; -/** -* @param {Node} root Root node whose `childNodes` will be parsed -* @param {!TemplateInfo} templateInfo Template metadata for current template -* @param {!NodeInfo} nodeInfo Node metadata for current template. -* @return {void} -*/ -Polymer_TemplateStamp._parseTemplateChildNodes = function(root, templateInfo, nodeInfo){}; -/** -* @param {HTMLTemplateElement} node Node to parse (a