Merge pull request #472 from IgorBabkin/easings-typings

Add typings for easing namespace
This commit is contained in:
Anton Lavrenov 2018-10-15 08:08:56 -05:00 committed by GitHub
commit 9c2fa8d315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

35
konva.d.ts vendored
View File

@ -93,23 +93,26 @@ declare namespace Konva {
static getRGB(color: string): string; static getRGB(color: string): string;
} }
type EasingFn = (elapsed: number, startValue: number, diff: number, duration: number) => number;
type ElasticEasingFn = (elapsed: number, startValue: number, diff: number, duration: number, a?: number, p?: number) => number;
export class Easings { export class Easings {
static BackEaseIn(): any; static BackEaseIn: EasingFn;
static BackEaseInOut(): any; static BackEaseInOut: EasingFn;
static BackEaseOut(): any; static BackEaseOut: EasingFn;
static BounceEaseIn(): any; static BounceEaseIn: EasingFn;
static BounceEaseInOut(): any; static BounceEaseInOut: EasingFn;
static BounceEaseOut(): any; static BounceEaseOut: EasingFn;
static EaseIn(): any; static EaseIn: EasingFn;
static EaseInOut(): any; static EaseInOut: EasingFn;
static EaseOut(): any; static EaseOut: EasingFn;
static ElasticEaseIn(): any; static ElasticEaseIn: ElasticEasingFn;
static ElasticEaseInOut(): any; static ElasticEaseInOut: ElasticEasingFn;
static ElasticEaseOut(): any; static ElasticEaseOut: ElasticEasingFn;
static Linear(): any; static Linear: EasingFn;
static StrongEaseIn(): any; static StrongEaseIn: EasingFn;
static StrongEaseInOut(): any; static StrongEaseInOut: EasingFn;
static StrongEaseOut(): any; static StrongEaseOut: EasingFn;
} }
class Filter {} class Filter {}