From e3b9d4e6a36abc118d8ac3d6f8022a89df3dd3db Mon Sep 17 00:00:00 2001 From: Simon Fuhrmann Date: Mon, 30 Jul 2018 11:06:33 -0700 Subject: [PATCH] Upstream externs changes for DomRepeatEvent --- externs/polymer-externs.js | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/externs/polymer-externs.js b/externs/polymer-externs.js index a34727c2bc..7c0ede16aa 100644 --- a/externs/polymer-externs.js +++ b/externs/polymer-externs.js @@ -32,7 +32,7 @@ let PolymerElementPropertiesMeta; let PolymerElementProperties; /** @record */ -let PolymerInit = function(){}; +let PolymerInit = function() {}; /** @type {string} */ PolymerInit.prototype.is; /** @type {(string | undefined)} */ @@ -48,7 +48,7 @@ PolymerInit.prototype.hostAttributes; /** @type {(!Object | undefined)} */ PolymerInit.prototype.listeners; -let PolymerElementConstructor = function (){}; +let PolymerElementConstructor = function () {}; /** @type {(string | undefined)} */ PolymerElementConstructor.is; /** @type {(string | undefined)} */ @@ -61,7 +61,7 @@ PolymerElementConstructor.observers; PolymerElementConstructor.template; /** @interface */ -let PropertiesMixinConstructor = function (){}; +let PropertiesMixinConstructor = function () {}; /** @type {(!PolymerElementProperties | undefined)} */ PropertiesMixinConstructor.prototype.properties; /** @return {void} */ @@ -86,7 +86,7 @@ Polymer.sanitizeDOMValue; function JSCompiler_renameProperty(string, obj) {} /** @record */ -function PolymerTelemetry(){} +function PolymerTelemetry() {} /** @type {number} */ PolymerTelemetry.instanceCount; /** @type {Array} */ @@ -164,3 +164,20 @@ var PolymerSpliceChange; * }} */ var PolymerDeepPropertyChange; + +/** + * Event object for events dispatched by children of a dom-repeat template. + * @see https://www.polymer-project.org/2.0/docs/devguide/templates#handling-events + * @extends {Event} + * @constructor + * @template T + */ +let DomRepeatEvent = function() {}; + +/** + * @type {{ + * index: number, + * item: T + * }} + */ +DomRepeatEvent.prototype.model;