Update type of "AnimationFn"

This commit is contained in:
Pig Fang 2018-08-01 17:47:09 +08:00
parent 224ae7c70d
commit 234be5df90
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,9 @@ interface IAnimation {
play(player: PlayerObject, time: number): void; play(player: PlayerObject, time: number): void;
} }
type AnimationFn = (player: PlayerObject, time: number) => void; interface AnimationFn {
(player: PlayerObject, time: number): void
}
type Animation = AnimationFn | IAnimation; type Animation = AnimationFn | IAnimation;
class AnimationHandle implements IAnimation { class AnimationHandle implements IAnimation {