Skip to content

Commit

Permalink
Bump type generator and generate new typings. (#5119)
Browse files Browse the repository at this point in the history
  • Loading branch information
aomarks committed Feb 15, 2018
1 parent 9d86135 commit 5c02730
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 20 deletions.
35 changes: 23 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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",
Expand Down
13 changes: 13 additions & 0 deletions types/lib/elements/dom-module.d.ts
Expand Up @@ -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;

/**
Expand Down
4 changes: 2 additions & 2 deletions types/lib/mixins/properties-changed.d.ts
Expand Up @@ -56,7 +56,7 @@ declare namespace Polymer {
*
* @param name Name of property
*/
typeForProperty(name: string): any;
typeForProperty(name: string): void;
}

interface PropertiesChanged {
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion types/lib/mixins/properties-mixin.d.ts
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions types/lib/mixins/property-accessors.d.ts
Expand Up @@ -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
Expand Down

0 comments on commit 5c02730

Please sign in to comment.