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.
|
* @experimental Animation support is experimental.
|
||||||
*/
|
*/
|
||||||
export abstract class AnimationPlayer {
|
export interface AnimationPlayer {
|
||||||
abstract onDone(fn: () => void): void;
|
onDone(fn: () => void): void;
|
||||||
abstract onStart(fn: () => void): void;
|
onStart(fn: () => void): void;
|
||||||
abstract onDestroy(fn: () => void): void;
|
onDestroy(fn: () => void): void;
|
||||||
abstract init(): void;
|
init(): void;
|
||||||
abstract hasStarted(): boolean;
|
hasStarted(): boolean;
|
||||||
abstract play(): void;
|
play(): void;
|
||||||
abstract pause(): void;
|
pause(): void;
|
||||||
abstract restart(): void;
|
restart(): void;
|
||||||
abstract finish(): void;
|
finish(): void;
|
||||||
abstract destroy(): void;
|
destroy(): void;
|
||||||
abstract reset(): void;
|
reset(): void;
|
||||||
abstract setPosition(p: any /** TODO #9100 */): void;
|
setPosition(p: any /** TODO #9100 */): void;
|
||||||
abstract getPosition(): number;
|
getPosition(): number;
|
||||||
get parentPlayer(): AnimationPlayer|null { throw new Error('NOT IMPLEMENTED: Base Class'); }
|
parentPlayer: AnimationPlayer|null;
|
||||||
set parentPlayer(player: AnimationPlayer|null) { throw new Error('NOT IMPLEMENTED: Base Class'); }
|
readonly totalTime: number;
|
||||||
get totalTime(): number { throw new Error('NOT IMPLEMENTED: Base Class'); }
|
|
||||||
beforeDestroy?: () => any;
|
beforeDestroy?: () => any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,23 +98,23 @@ export interface AnimationOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare abstract class AnimationPlayer {
|
export interface AnimationPlayer {
|
||||||
beforeDestroy?: () => any;
|
beforeDestroy?: () => any;
|
||||||
parentPlayer: AnimationPlayer | null;
|
parentPlayer: AnimationPlayer | null;
|
||||||
readonly totalTime: number;
|
readonly totalTime: number;
|
||||||
abstract destroy(): void;
|
destroy(): void;
|
||||||
abstract finish(): void;
|
finish(): void;
|
||||||
abstract getPosition(): number;
|
getPosition(): number;
|
||||||
abstract hasStarted(): boolean;
|
hasStarted(): boolean;
|
||||||
abstract init(): void;
|
init(): void;
|
||||||
abstract onDestroy(fn: () => void): void;
|
onDestroy(fn: () => void): void;
|
||||||
abstract onDone(fn: () => void): void;
|
onDone(fn: () => void): void;
|
||||||
abstract onStart(fn: () => void): void;
|
onStart(fn: () => void): void;
|
||||||
abstract pause(): void;
|
pause(): void;
|
||||||
abstract play(): void;
|
play(): void;
|
||||||
abstract reset(): void;
|
reset(): void;
|
||||||
abstract restart(): void;
|
restart(): void;
|
||||||
abstract setPosition(p: any): void;
|
setPosition(p: any): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user