fix return type of CompositeAnimation.add

This commit is contained in:
Haowei Wen 2022-02-03 23:12:14 +08:00
parent 9f975c3354
commit c26471b104
1 changed files with 2 additions and 2 deletions

View File

@ -83,9 +83,9 @@ class AnimationWrapper implements SubAnimationHandle, IAnimation {
export class CompositeAnimation implements IAnimation {
readonly handles: Set<AnimationHandle & IAnimation> = new Set();
readonly handles: Set<SubAnimationHandle & IAnimation> = new Set();
add(animation: Animation): AnimationHandle {
add(animation: Animation): SubAnimationHandle {
const handle = new AnimationWrapper(animation);
handle.remove = (): void => {
this.handles.delete(handle);