From a4591abcd3dbace10113ba6d3857da5c38a6073f Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Fri, 11 Aug 2017 11:55:04 -0700 Subject: [PATCH] Update closure compiler to support polymer pass v2 Looser typing for Polymer({}) to support polymer pass transform --- externs/polymer-externs.js | 29 ++++++++++++++++------------- package.json | 2 +- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/externs/polymer-externs.js b/externs/polymer-externs.js index fdbbd3620e..84651615d4 100644 --- a/externs/polymer-externs.js +++ b/externs/polymer-externs.js @@ -7,8 +7,8 @@ /** * @typedef {{ + * type: !Function, * value: *, - * type: (!Function | undefined), * readOnly: (boolean | undefined), * computed: (string | undefined), * reflectToAttribute: (boolean | undefined), @@ -23,18 +23,21 @@ let PolymerElementPropertiesMeta; */ let PolymerElementProperties; -/** - * @typedef {{ - * is: string, - * extends: (string | undefined), - * properties: (!PolymerElementProperties | undefined), - * observers: (!Array | undefined), - * template: (!HTMLTemplateElement | string | undefined), - * hostAttributes: (!Object | undefined), - * listeners: (!Object | undefined) - * }} - */ -let PolymerInit; +let PolymerInit = function(){}; +/** @type {string} */ +PolymerInit.prototype.is; +/** @type {(string | undefined)} */ +PolymerInit.prototype.extends; +/** @type {(!PolymerElementProperties | undefined)} */ +PolymerInit.prototype.properties; +/** @type {(!Array | undefined)} */ +PolymerInit.prototype.observers; +/** @type {(!HTMLTemplateElement | string | undefined)} */ +PolymerInit.prototype.template; +/** @type {(!Object | undefined)} */ +PolymerInit.prototype.hostAttributes; +/** @type {(!Object | undefined)} */ +PolymerInit.prototype.listeners; let PolymerElementConstructor = function (){}; /** @type {(string | undefined)} */ diff --git a/package.json b/package.json index af32c6686c..ce532a1750 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "del": "^3.0.0", "dom5": "^2.3.0", "eslint-plugin-html": "^2.0.1", - "google-closure-compiler": "^20170626.0.0", + "google-closure-compiler": "^20170806.0.0", "gulp": "^3.9.1", "gulp-babel": "^6.1.2", "gulp-eslint": "^3.0.1",