From e59d8a76ff68f89e21062e46e56b2aba4b37d731 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Sun, 10 Jan 2016 14:05:06 -0600 Subject: [PATCH] chore(): fix typescript errors --- ionic/animations/animation.ts | 37 ++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/ionic/animations/animation.ts b/ionic/animations/animation.ts index 71bda70c1c..592edb1272 100644 --- a/ionic/animations/animation.ts +++ b/ionic/animations/animation.ts @@ -1,6 +1,7 @@ import {CSS, rafFrames} from '../util/dom'; import {extend} from '../util/util'; +const doc: any = document; /** Animation Steps/Process @@ -27,6 +28,27 @@ import {extend} from '../util/util'; * @private **/ export class Animation { + private _parent: Animation; + private _isStaged: boolean; + private _isFinished: boolean; + private _duration: number; + private _easing: any; + private _from: any; + private _to: any; + private _rate: any; + private _opts: any; + private _el: Array; + private _chld: Array; + private _ani: Array; + private _bfSty: any; + private _bfAdd: Array; + private _bfRmv: Array; + private _afAdd: Array; + private _afRmv: Array; + private _readys: Array; + private _plays: Array; + private _finishes: Array; + public isProgress: boolean; constructor(ele, opts={}) { this.reset(); @@ -37,7 +59,7 @@ export class Animation { this.elements(ele); - if (!document.documentElement.animate) { + if (!doc.documentElement.animate) { console.error('Web Animations polyfill missing'); } } @@ -47,8 +69,8 @@ export class Animation { this._chld = []; this._ani = []; - this._bfAdd = []; this._bfSty = {}; + this._bfAdd = []; this._bfRmv = []; this._afAdd = []; this._afRmv = []; @@ -62,7 +84,7 @@ export class Animation { if (ele) { if (typeof ele === 'string') { // string query selector - ele = document.querySelectorAll(ele); + ele = doc.querySelectorAll(ele); } if (ele.length) { @@ -562,6 +584,15 @@ export class Animation { * @private **/ class Animate { + private toEffect: any; + private fromEffect: any; + private duration: any; + private rate: any; + private easing: any; + private effects: any; + private ani: any; + private shouldAnimate: boolean; + private ele: any; constructor(ele, fromEffect, toEffect, duration, easingConfig, playbackRate) { // https://w3c.github.io/web-animations/