Skip to content

Commit

Permalink
Update and/or configure type declarations. (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
aomarks authored Feb 17, 2018
1 parent bc99a7a commit 3153518
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 68 deletions.
2 changes: 1 addition & 1 deletion animations/cascaded-animation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* ```
*/
interface CascadedAnimationElement extends Polymer.Element, Polymer.NeonAnimationBehavior {
complete(): any;
complete(): void;
configure(config: {animation: string, nodes: Element[], nodeDelay?: number, timing?: object|null}): any;
}

Expand Down
2 changes: 1 addition & 1 deletion animations/opaque-animation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* webkit/safari from drawing a frame before an animation for elements that animate from display:none.
*/
interface OpaqueAnimationElement extends Polymer.Element, Polymer.NeonAnimationBehavior {
complete(config: any): any;
complete(config: any): void;
configure(config: any): any;
}

Expand Down
2 changes: 1 addition & 1 deletion animations/reverse-ripple-animation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* ```
*/
interface ReverseRippleAnimationElement extends Polymer.Element, Polymer.NeonSharedElementAnimationBehavior {
complete(): any;
complete(): void;
configure(config: any): any;
}

Expand Down
2 changes: 1 addition & 1 deletion animations/ripple-animation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* ```
*/
interface RippleAnimationElement extends Polymer.Element, Polymer.NeonSharedElementAnimationBehavior {
complete(): any;
complete(): void;
configure(config: any): any;
}

Expand Down
8 changes: 4 additions & 4 deletions neon-animatable-behavior.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ declare namespace Polymer {
* manually if using this. The animated node is set to `this` if using this property.
*/
exitAnimation: string|null|undefined;
_entryAnimationChanged(): any;
_exitAnimationChanged(): any;
_copyProperties(config1: any, config2: any): any;
_entryAnimationChanged(): void;
_exitAnimationChanged(): void;
_copyProperties(config1: any, config2: any): void;
_cloneConfig(config: any): any;
_getAnimationConfigRecursive(type: any, map: any, allConfigs: any): any;
_getAnimationConfigRecursive(type: any, map: any, allConfigs: any): void;

/**
* An element implementing `Polymer.NeonAnimationRunnerBehavior` calls this method to configure
Expand Down
8 changes: 4 additions & 4 deletions neon-animated-pages.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ interface NeonAnimatedPagesElement extends Polymer.Element, Polymer.IronResizabl
* if true, the initial page selection will also be animated according to its animation config.
*/
animateInitialSelection: boolean|null|undefined;
_onIronSelect(event: any): any;
_completeSelectedChanged(oldPage?: object|null, selectedPage?: object|null): any;
_onNeonAnimationFinish(event: any): any;
_notifyPageResize(): any;
_onIronSelect(event: any): void;
_completeSelectedChanged(oldPage?: object|null, selectedPage?: object|null): void;
_onNeonAnimationFinish(event: any): void;
_notifyPageResize(): void;
}

interface HTMLElementTagNameMap {
Expand Down
7 changes: 4 additions & 3 deletions neon-animation-behavior.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ declare namespace Polymer {

/**
* Can be used to determine that elements implement this behavior.
*
*/
isNeonAnimation: boolean;
created(): any;
created(): void;

/**
* Returns the animation timing by mixing in properties from `config` to the defaults defined
Expand All @@ -37,12 +38,12 @@ declare namespace Polymer {
/**
* Sets `transform` and `transformOrigin` properties along with the prefixed versions.
*/
setPrefixedProperty(node: any, property: any, value: any): any;
setPrefixedProperty(node: any, property: any, value: any): void;

/**
* Called when the animation finishes.
*/
complete(config: any): any;
complete(config: any): void;
}

const NeonAnimationBehavior: object;
Expand Down
6 changes: 3 additions & 3 deletions neon-animation-runner-behavior.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ declare namespace Polymer {
interface NeonAnimationRunnerBehavior extends Polymer.NeonAnimatableBehavior {
_configureAnimations(configs: any): any;
_shouldComplete(activeEntries: any): any;
_complete(activeEntries: any): any;
_complete(activeEntries: any): void;

/**
* Plays an animation with an optional `type`.
*/
playAnimation(type?: string, cookie?: object): any;
playAnimation(type?: string, cookie?: object): void;

/**
* Cancels the currently running animations.
*/
cancelAnimation(): any;
cancelAnimation(): void;
}

const NeonAnimationRunnerBehavior: object;
Expand Down
88 changes: 39 additions & 49 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 @@ -8,7 +8,7 @@
},
"license": "BSD-3-Clause",
"devDependencies": {
"@polymer/gen-typescript-declarations": "^1.1.1",
"@polymer/gen-typescript-declarations": "^1.2.0",
"bower": "^1.8.0"
},
"scripts": {
Expand Down

0 comments on commit 3153518

Please sign in to comment.