Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump type generator and generate new typings. #5119

Merged
merged 1 commit into from
Feb 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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