File tree Expand file tree Collapse file tree 2 files changed +36
-2
lines changed
Expand file tree Collapse file tree 2 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -404,7 +404,7 @@ async function animateXpBar(
404404
405405 let firstOneDone = false ;
406406 let animationDuration = quickSpeed ;
407- let animationEasing = "linear" ;
407+ let animationEasing : Misc . JQueryEasing = "linear" ;
408408 let decrement = 1 - ( startingLevel % 1 ) ;
409409
410410 do {
Original file line number Diff line number Diff line change @@ -449,11 +449,45 @@ export function isAnyPopupVisible(): boolean {
449449 return popupVisible ;
450450}
451451
452+ export type JQueryEasing =
453+ | "linear"
454+ | "swing"
455+ | "easeInSine"
456+ | "easeOutSine"
457+ | "easeInOutSine"
458+ | "easeInQuad"
459+ | "easeOutQuad"
460+ | "easeInOutQuad"
461+ | "easeInCubic"
462+ | "easeOutCubic"
463+ | "easeInOutCubic"
464+ | "easeInQuart"
465+ | "easeOutQuart"
466+ | "easeInOutQuart"
467+ | "easeInQuint"
468+ | "easeOutQuint"
469+ | "easeInOutQuint"
470+ | "easeInExpo"
471+ | "easeOutExpo"
472+ | "easeInOutExpo"
473+ | "easeInCirc"
474+ | "easeOutCirc"
475+ | "easeInOutCirc"
476+ | "easeInBack"
477+ | "easeOutBack"
478+ | "easeInOutBack"
479+ | "easeInElastic"
480+ | "easeOutElastic"
481+ | "easeInOutElastic"
482+ | "easeInBounce"
483+ | "easeOutBounce"
484+ | "easeInOutBounce" ;
485+
452486export async function promiseAnimation (
453487 el : JQuery ,
454488 animation : Record < string , string > ,
455489 duration : number ,
456- easing : string
490+ easing : JQueryEasing = "swing"
457491) : Promise < void > {
458492 return new Promise ( ( resolve ) => {
459493 el . animate ( animation , applyReducedMotion ( duration ) , easing , resolve ) ;
You can’t perform that action at this time.
0 commit comments