simplify types

This commit is contained in:
Pig Fang 2018-02-05 18:30:14 +08:00
parent c483ae33ee
commit fcd7e58688
2 changed files with 10 additions and 8 deletions

View File

@ -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,

10
types/skinview3d.d.ts vendored
View File

@ -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'