diff --git a/package-lock.json b/package-lock.json index 9a1bb2de04..a8d8014ef2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,9 +15,9 @@ } }, "@polymer/gen-typescript-declarations": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@polymer/gen-typescript-declarations/-/gen-typescript-declarations-1.1.3.tgz", - "integrity": "sha512-NJriR/H/Jsc0XV0sBSNRn85jl4p0RUkX4fJCHqOfcjJY/9X360vpKXLeYdwvdF6bu0PuBsEsntsTxiEFsPFAZw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@polymer/gen-typescript-declarations/-/gen-typescript-declarations-1.2.0.tgz", + "integrity": "sha512-a5DFXI3TdZSVOMH4608LVaBLmcr+mwM2+B8OSBiB9WFNCtdqzUXwtB5We6vBzrThXlO4uRo7d2pEqjNXMAlEkA==", "dev": true, "requires": { "@types/doctrine": "0.0.3", @@ -30,7 +30,7 @@ "fs-extra": "5.0.0", "glob": "7.1.2", "minimatch": "3.0.4", - "polymer-analyzer": "3.0.0-pre.10" + "polymer-analyzer": "3.0.0-pre.12" }, "dependencies": { "@types/doctrine": { @@ -39,6 +39,17 @@ "integrity": "sha1-6JLSk8ksnB0/mvcsFaVU+8fgiVo=", "dev": true }, + "dom5": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dom5/-/dom5-3.0.0.tgz", + "integrity": "sha512-PbE+7C4Sh1dHDTLNuSDaMUGD1ivDiSZw0L+a9xVUzUKeQ8w3vdzfKHRA07CxcrFZZOa1SGl2nIJ9T49j63q+bg==", + "dev": true, + "requires": { + "@types/parse5": "2.2.34", + "clone": "2.1.1", + "parse5": "4.0.0" + } + }, "fs-extra": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", @@ -51,15 +62,15 @@ } }, "parse5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-2.2.3.tgz", - "integrity": "sha1-DE/EHBAAxea5PUiwP4CDg3g06fY=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", "dev": true }, "polymer-analyzer": { - "version": "3.0.0-pre.10", - "resolved": "https://registry.npmjs.org/polymer-analyzer/-/polymer-analyzer-3.0.0-pre.10.tgz", - "integrity": "sha1-9vCd15PdL0IomsAdoCb8q6ZfGYw=", + "version": "3.0.0-pre.12", + "resolved": "https://registry.npmjs.org/polymer-analyzer/-/polymer-analyzer-3.0.0-pre.12.tgz", + "integrity": "sha512-QQL70IC85hI6q9uQeresEMcT1Qf8YR/zDe1qG8WWeeFAZk8z0lmzUpsfcAWz+bM4wpDdXrtd4HitIs4p0CHl/w==", "dev": true, "requires": { "@types/babel-generator": "6.25.1", @@ -82,11 +93,11 @@ "clone": "2.1.1", "cssbeautify": "0.3.1", "doctrine": "2.1.0", - "dom5": "2.3.0", + "dom5": "3.0.0", "indent": "0.0.2", "jsonschema": "1.2.2", "minimatch": "3.0.4", - "parse5": "2.2.3", + "parse5": "4.0.0", "polymer-project-config": "3.8.1", "shady-css-parser": "0.1.0", "stable": "0.1.6", diff --git a/package.json b/package.json index 4e3f989a40..3d315d6da3 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "devDependencies": { "@polymer/gen-closure-declarations": "^0.4.0", - "@polymer/gen-typescript-declarations": "^1.1.3", + "@polymer/gen-typescript-declarations": "^1.2.0", "@webcomponents/shadycss": "^1.1.0", "@webcomponents/webcomponentsjs": "^1.1.0", "babel-preset-minify": "^0.2.0", diff --git a/types/lib/elements/dom-module.d.ts b/types/lib/elements/dom-module.d.ts index 960513849d..7229968d42 100644 --- a/types/lib/elements/dom-module.d.ts +++ b/types/lib/elements/dom-module.d.ts @@ -33,6 +33,19 @@ declare namespace Polymer { * let img = customElements.get('dom-module').import('foo', 'img'); */ class DomModule extends HTMLElement { + + /** + * The absolute URL of the original location of this `dom-module`. + * + * This value will differ from this element's `ownerDocument` in the + * following ways: + * - Takes into account any `assetpath` attribute added during bundling + * to indicate the original location relative to the bundled location + * - Uses the HTMLImports polyfill's `importForElement` API to ensure + * the path is relative to the import document's location since + * `ownerDocument` is not currently polyfilled + * + */ readonly assetpath: any; /** diff --git a/types/lib/mixins/properties-changed.d.ts b/types/lib/mixins/properties-changed.d.ts index 02555dcb96..13364e1980 100644 --- a/types/lib/mixins/properties-changed.d.ts +++ b/types/lib/mixins/properties-changed.d.ts @@ -56,7 +56,7 @@ declare namespace Polymer { * * @param name Name of property */ - typeForProperty(name: string): any; + typeForProperty(name: string): void; } interface PropertiesChanged { @@ -84,7 +84,7 @@ declare namespace Polymer { * * @param property Name of the property */ - _addPropertyToAttributeMap(property: string): any; + _addPropertyToAttributeMap(property: string): void; /** * Defines a property accessor for the given property. diff --git a/types/lib/mixins/properties-mixin.d.ts b/types/lib/mixins/properties-mixin.d.ts index a5ed6a966f..566cd68633 100644 --- a/types/lib/mixins/properties-mixin.d.ts +++ b/types/lib/mixins/properties-mixin.d.ts @@ -53,7 +53,7 @@ declare namespace Polymer { * accessors exist on the element prototype. This method is called by * `finalize` and finalizes the class constructor. */ - _finalizeClass(): any; + _finalizeClass(): void; } interface PropertiesMixin { diff --git a/types/lib/mixins/property-accessors.d.ts b/types/lib/mixins/property-accessors.d.ts index 186536e1dc..b4c738aca7 100644 --- a/types/lib/mixins/property-accessors.d.ts +++ b/types/lib/mixins/property-accessors.d.ts @@ -24,14 +24,14 @@ declare namespace Polymer { * For basic usage of this mixin: * * - Declare attributes to observe via the standard `static get observedAttributes()`. Use - * `dash-case` attribute names to represent `camelCase` property names. + * `dash-case` attribute names to represent `camelCase` property names. * - Implement the `_propertiesChanged` callback on the class. - * - Call `MyClass.createPropertiesForAttributes()` **once** on the class to generate - * property accessors for each observed attribute. This must be called before the first + * - Call `MyClass.createPropertiesForAttributes()` **once** on the class to generate + * property accessors for each observed attribute. This must be called before the first * instance is created, for example, by calling it before calling `customElements.define`. * It can also be called lazily from the element's `constructor`, as long as it's guarded so * that the call is only made once, when the first instance is created. - * - Call `this._enableProperties()` in the element's `connectedCallback` to enable + * - Call `this._enableProperties()` in the element's `connectedCallback` to enable * the accessors. * * Any `observedAttributes` will automatically be