Skip to content

Commit 17614cd

Browse files
authored
refactor(animation): rename AnimationOnFinishOptions to AnimationCallbackOptions (ionic-team#19551)
1 parent bfb704e commit 17614cd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

core/src/utils/animation/animation-interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export interface Animation {
210210
* Add a callback to be run
211211
* upon the animation ending
212212
*/
213-
onFinish(callback: AnimationLifecycle, opts?: AnimationOnFinishOptions): Animation;
213+
onFinish(callback: AnimationLifecycle, opts?: AnimationCallbackOptions): Animation;
214214

215215
/** @deprecated */
216216
playAsync(): Promise<void>;
@@ -220,7 +220,7 @@ export interface Animation {
220220

221221
export type AnimationLifecycle = (currentStep: 0 | 1, animation: Animation) => void;
222222

223-
export interface AnimationOnFinishOptions {
223+
export interface AnimationCallbackOptions {
224224
oneTimeCallback: boolean;
225225
}
226226

core/src/utils/animation/animation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
import { raf } from '../helpers';
44

5-
import { Animation, AnimationDirection, AnimationFill, AnimationKeyFrame, AnimationKeyFrames, AnimationLifecycle, AnimationOnFinishOptions, AnimationPlayOptions } from './animation-interface';
5+
import { Animation, AnimationCallbackOptions, AnimationDirection, AnimationFill, AnimationKeyFrame, AnimationKeyFrames, AnimationLifecycle, AnimationPlayOptions } from './animation-interface';
66
import { addClassToArray, animationEnd, createKeyframeStylesheet, generateKeyframeName, generateKeyframeRules, removeStyleProperty, setStyleProperty } from './animation-utils';
77

88
interface AnimationOnFinishCallback {
99
c: AnimationLifecycle;
10-
o?: AnimationOnFinishOptions;
10+
o?: AnimationCallbackOptions;
1111
}
1212

1313
interface AnimationInternal extends Animation {
@@ -101,7 +101,7 @@ export const createAnimation = (): Animation => {
101101
cleanUpStyleSheets();
102102
};
103103

104-
const onFinish = (callback: AnimationLifecycle, opts?: AnimationOnFinishOptions) => {
104+
const onFinish = (callback: AnimationLifecycle, opts?: AnimationCallbackOptions) => {
105105
const callbacks = (opts && opts.oneTimeCallback) ? onFinishOneTimeCallbacks : onFinishCallbacks;
106106
callbacks.push({ c: callback, o: opts });
107107

0 commit comments

Comments
 (0)