From d0e8b57d618b566ad48538dfecab99cb094954b5 Mon Sep 17 00:00:00 2001 From: pragdave Date: Sun, 31 May 2020 16:28:47 -0500 Subject: add string parameters to Runner.ease() --- svg.js.d.ts | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'svg.js.d.ts') diff --git a/svg.js.d.ts b/svg.js.d.ts index 99ec3b1..d96d237 100644 --- a/svg.js.d.ts +++ b/svg.js.d.ts @@ -80,14 +80,14 @@ declare module "@svgdotjs/svg.js" { } - let easing: { - '-'(pos: number): number; - '<>'(pos: number): number; - '>'(pos: number): number; - '<'(pos: number): number; - bezier(x1: number, y1: number, x2: number, y2: number): (t: number) => number; - steps(steps: number, stepPosition?: "jump-start"|"jump-end"|"jump-none"|"jump-both"|"start"|"end"): (t: number, beforeFlag?: boolean) => number; - } + // let easing: { + // '-'(pos: number): number; + // '<>'(pos: number): number; + // '>'(pos: number): number; + // '<'(pos: number): number; + // bezier(x1: number, y1: number, x2: number, y2: number): (t: number) => number; + // steps(steps: number, stepPosition?: "jump-start"|"jump-end"|"jump-none"|"jump-both"|"start"|"end"): (t: number, beforeFlag?: boolean) => number; + // } let regex: { delimiter: RegExp; @@ -805,6 +805,9 @@ declare module "@svgdotjs/svg.js" { type TimeLike = number | TimesParam | Stepper + type EasingCallback = (...any) => number + type EasingLiteral = "<>" | "-" | "<" | ">" + class Runner { constructor(); constructor(options: Function); @@ -826,6 +829,8 @@ declare module "@svgdotjs/svg.js" { loop(times: TimesParam): this delay(delay: number): this + + during(fn: Function): this queue(initFn: Function, runFn: Function, retargetFn?: boolean | Function, isTransform?: boolean): this after(fn: EventListener): this @@ -843,7 +848,8 @@ declare module "@svgdotjs/svg.js" { reset(): this finish(): this reverse(r?: boolean): this - ease(fn: Function): this + ease(fn: EasingCallback) : this + ease(kind: EasingLiteral) : this active(): boolean active(a: boolean): this addTransform(m: Matrix): this -- cgit v1.2.3