perf(animations): reduce size of animations bundle
before: animations.umd.js = 33k animations.umd.min.js = 9.0k after: animations.umd.js = 31k animations.umd.min.js = 7.9k
This commit is contained in:
parent
6416e79933
commit
712630ca65
|
@ -10,23 +10,22 @@ import {scheduleMicroTask} from '../util';
|
|||
/**
|
||||
* @experimental Animation support is experimental.
|
||||
*/
|
||||
export abstract class AnimationPlayer {
|
||||
abstract onDone(fn: () => void): void;
|
||||
abstract onStart(fn: () => void): void;
|
||||
abstract onDestroy(fn: () => void): void;
|
||||
abstract init(): void;
|
||||
abstract hasStarted(): boolean;
|
||||
abstract play(): void;
|
||||
abstract pause(): void;
|
||||
abstract restart(): void;
|
||||
abstract finish(): void;
|
||||
abstract destroy(): void;
|
||||
abstract reset(): void;
|
||||
abstract setPosition(p: any /** TODO #9100 */): void;
|
||||
abstract getPosition(): number;
|
||||
get parentPlayer(): AnimationPlayer|null { throw new Error('NOT IMPLEMENTED: Base Class'); }
|
||||
set parentPlayer(player: AnimationPlayer|null) { throw new Error('NOT IMPLEMENTED: Base Class'); }
|
||||
get totalTime(): number { throw new Error('NOT IMPLEMENTED: Base Class'); }
|
||||
export interface AnimationPlayer {
|
||||
onDone(fn: () => void): void;
|
||||
onStart(fn: () => void): void;
|
||||
onDestroy(fn: () => void): void;
|
||||
init(): void;
|
||||
hasStarted(): boolean;
|
||||
play(): void;
|
||||
pause(): void;
|
||||
restart(): void;
|
||||
finish(): void;
|
||||
destroy(): void;
|
||||
reset(): void;
|
||||
setPosition(p: any /** TODO #9100 */): void;
|
||||
getPosition(): number;
|
||||
parentPlayer: AnimationPlayer|null;
|
||||
readonly totalTime: number;
|
||||
beforeDestroy?: () => any;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,23 +98,23 @@ export interface AnimationOptions {
|
|||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class AnimationPlayer {
|
||||
export interface AnimationPlayer {
|
||||
beforeDestroy?: () => any;
|
||||
parentPlayer: AnimationPlayer | null;
|
||||
readonly totalTime: number;
|
||||
abstract destroy(): void;
|
||||
abstract finish(): void;
|
||||
abstract getPosition(): number;
|
||||
abstract hasStarted(): boolean;
|
||||
abstract init(): void;
|
||||
abstract onDestroy(fn: () => void): void;
|
||||
abstract onDone(fn: () => void): void;
|
||||
abstract onStart(fn: () => void): void;
|
||||
abstract pause(): void;
|
||||
abstract play(): void;
|
||||
abstract reset(): void;
|
||||
abstract restart(): void;
|
||||
abstract setPosition(p: any): void;
|
||||
destroy(): void;
|
||||
finish(): void;
|
||||
getPosition(): number;
|
||||
hasStarted(): boolean;
|
||||
init(): void;
|
||||
onDestroy(fn: () => void): void;
|
||||
onDone(fn: () => void): void;
|
||||
onStart(fn: () => void): void;
|
||||
pause(): void;
|
||||
play(): void;
|
||||
reset(): void;
|
||||
restart(): void;
|
||||
setPosition(p: any): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
|
|
Loading…
Reference in New Issue