From fcd7e58688ed4b78da9d19302e7b55a255a1389e Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Mon, 5 Feb 2018 18:30:14 +0800 Subject: [PATCH] simplify types --- types/animation.d.ts | 8 +------- types/skinview3d.d.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/types/animation.d.ts b/types/animation.d.ts index 5e01acf..6fb372c 100644 --- a/types/animation.d.ts +++ b/types/animation.d.ts @@ -4,13 +4,7 @@ type AnimationFn = (player: PlayerObject, time: number) => void interface IAnimation { play(player: PlayerObject, time: number): void } -export type Animation = - | AnimationFn - | IAnimation - | { - play(player: PlayerObject, time: number): void - [x: string]: any - } +export type Animation = AnimationFn | IAnimation declare function invokeAnimation( animation: Animation, diff --git a/types/skinview3d.d.ts b/types/skinview3d.d.ts index 2836014..c6c854b 100644 --- a/types/skinview3d.d.ts +++ b/types/skinview3d.d.ts @@ -1,3 +1,11 @@ -export { CompositeAnimation, WalkAnimation, Animation } from './animation' +export { + CompositeAnimation, + WalkAnimation, + Animation, + AnimationFn, + IAnimation +} from './animation' + export { SkinViewer, SkinControl } from './viewer' + export { SkinObject, CapeObject, PlayerObject } from './model'