[jquery] Remove removed parameters from EasingMethod. (#29663)

These were never available in jQuery 3.0+.
This commit is contained in:
Leonard Thieu
2018-10-11 14:26:08 -07:00
committed by Andy
parent 7b99141476
commit 86fd332d85
2 changed files with 2 additions and 31 deletions
+1 -26
View File
@@ -30179,32 +30179,7 @@ $( "input" ).click(function() {
(fx: Tween<TElement>): void;
}
/**
* @deprecated ​ Deprecated.
*
* **Cause**: Additional arguments for `jQuery.easing` methods were never documented and are redundant since the same behavior can be easily achieved without them. When Migrate detects this case, the specified easing function is not used and `"linear"` easing is used instead for the animation.
*
* **Solution**: Rewrite the easing function to only use one argument. If you are using the \`{@link http://gsgd.co.uk/sandbox/jquery/easing jQuery Easing plugin}\`, upgrade to \`{@link https://github.com/gdsmith/jquery.easing/releases version 1.4.0 or higher}\`.
*
* For example, to implement \`{@link https://en.wikipedia.org/wiki/Cubic_function Cubic easing}\`, the old function might be:
*
```js
jQuery.easing.easeInCubic = function ( p, t, b, c, d ) {
return c * ( t /= d ) * t * t + b;
}
```
*
* You can achive same effect with this:
*
```js
jQuery.easing.easeInCubic = function ( p ) {
return Math.pow( p, 3 );
}
```
*
* See jQuery-ui \`{@link https://github.com/jquery/jquery-ui/commit/c0093b599fcd58b6ad122ab425c4cc1a4da4a520#diff-9cd789a170c765edcf0f4854db386e1a commit}\` for other possible cases.
*/
type EasingMethod = (p: number, t: number, b: number, c: number, d: number) => number;
type EasingMethod = (percent: number) => number;
interface Easings {
[name: string]: EasingMethod;
+1 -5
View File
@@ -7901,11 +7901,7 @@ function JQuery_EffectsOptions() {
}
function JQuery_Easings() {
jQuery.easing.easeInCubic = (p: number, t: number, b: number, c: number, d: number) => {
return c * (t /= d) * t * t + b;
};
jQuery.easing.easeInCubic = (p: number) => {
jQuery.easing.easeInCubic = (p) => {
return Math.pow(p, 3);
};
}