UNPKG

1.27 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google Inc. All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { AnimationPlayer } from '@angular/core';
9export declare class MockAnimationPlayer implements AnimationPlayer {
10 startingStyles: {
11 [key: string]: string | number;
12 };
13 keyframes: Array<[number, {
14 [style: string]: string | number;
15 }]>;
16 private _onDoneFns;
17 private _onStartFns;
18 private _finished;
19 private _destroyed;
20 private _started;
21 parentPlayer: AnimationPlayer;
22 previousStyles: {
23 [styleName: string]: string | number;
24 };
25 log: any[];
26 constructor(startingStyles?: {
27 [key: string]: string | number;
28 }, keyframes?: Array<[number, {
29 [style: string]: string | number;
30 }]>, previousPlayers?: AnimationPlayer[]);
31 private _onFinish();
32 init(): void;
33 onDone(fn: () => void): void;
34 onStart(fn: () => void): void;
35 hasStarted(): boolean;
36 play(): void;
37 pause(): void;
38 restart(): void;
39 finish(): void;
40 reset(): void;
41 destroy(): void;
42 setPosition(p: number): void;
43 getPosition(): number;
44 private _captureStyles();
45}