1
+ import type { TypeInterpolationFunction } from "./utils" ;
1
2
export * from "./utils" ;
2
3
/**
3
4
* The format to use when defining custom frame functions
@@ -190,6 +191,25 @@ export declare function interpolateComplex(frames: number[], values: (string | n
190
191
* `[SpringFrame, mass, stiffness, damping, velocity]`
191
192
*/
192
193
export declare type TypeArrayFrameFunctionFormat = [ TypeFrameFunction , ...number [ ] ] ;
194
+ /**
195
+ * The list of spring easing functions
196
+ */
197
+ export declare let EasingFunctions : {
198
+ spring : TypeFrameFunction ;
199
+ "spring-in" : TypeFrameFunction ;
200
+ "spring-out" : TypeFrameFunction ;
201
+ "spring-in-out" : TypeFrameFunction ;
202
+ "spring-out-in" : TypeFrameFunction ;
203
+ } ;
204
+ export declare let EasingFunctionKeys : string [ ] ;
205
+ /**
206
+ * Allows you to register new easing functions
207
+ */
208
+ export declare function registerEasingFunction < T extends string > ( key : T , fn ?: TypeFrameFunction ) : void ;
209
+ /**
210
+ * Allows you to register multiple new easing functions
211
+ */
212
+ export declare function registerEasingFunctions < T extends Record < string , TypeFrameFunction > > ( obj : T ) : void ;
193
213
/**
194
214
* The formats supported for easings,
195
215
* @example
@@ -200,7 +220,7 @@ export declare type TypeArrayFrameFunctionFormat = [TypeFrameFunction, ...number
200
220
* * `"spring-out-in(mass, stiffness, damping, velocity)"`
201
221
* `[SpringFrame, mass, stiffness, damping, velocity]`
202
222
*/
203
- export declare type TypeEasings = `${keyof typeof EasingFunctions } ` | `${keyof typeof EasingFunctions } (${string } )` | TypeArrayFrameFunctionFormat ;
223
+ export declare type TypeEasings = `${keyof typeof EasingFunctions } ` | `${keyof typeof EasingFunctions } (${string } )` | ( string & { } ) | TypeArrayFrameFunctionFormat ;
204
224
/**
205
225
* Spring Easing has 3 properties they are `easing` (all spring frame functions are supported), `numPoints` (the size of the Array the frmae function should create), and `decimal` (the number of decimal places of the values within said Array).
206
226
*
@@ -236,25 +256,6 @@ export declare type TypeEasingOptions = {
236
256
numPoints ?: number ;
237
257
decimal ?: number ;
238
258
} ;
239
- /**
240
- * The list of spring easing functions
241
- */
242
- export declare const EasingFunctions : {
243
- spring : TypeFrameFunction ;
244
- "spring-in" : TypeFrameFunction ;
245
- "spring-out" : TypeFrameFunction ;
246
- "spring-in-out" : TypeFrameFunction ;
247
- "spring-out-in" : TypeFrameFunction ;
248
- } ;
249
- export declare let EasingFunctionKeys : string [ ] ;
250
- /**
251
- * Allows you to register new easing functions
252
- */
253
- export declare function registerEasingFunction ( key : string , fn ?: TypeFrameFunction ) : void ;
254
- /**
255
- * Allows you to register multiple new easing functions
256
- */
257
- export declare function registerEasingFunctions ( ...obj : Array < Record < string , any > > ) : void ;
258
259
/**
259
260
* Convert easing parameters to Array of numbers, e.g. "spring(2, 500)" to [2, 500]
260
261
*
@@ -374,5 +375,5 @@ export declare function GenerateSpringFrames(options?: TypeEasingOptions): [numb
374
375
* ]
375
376
* ```
376
377
*/
377
- export declare function SpringEasing ( values : ( string | number ) [ ] , options ?: TypeEasingOptions | TypeEasingOptions [ "easing" ] , customInterpolate ?: ( frames : number [ ] , values : any [ ] , decimal ?: number ) => string | number | any ) : [ ( string | number | any ) [ ] , number ] ;
378
+ export declare function SpringEasing ( values : ( string | number ) [ ] , options ?: TypeEasingOptions | TypeEasingOptions [ "easing" ] , customInterpolate ?: TypeInterpolationFunction ) : [ ( string | number | any ) [ ] , number ] ;
378
379
export default SpringEasing ;
0 commit comments