From 66094c88a8c6452cbc0943af282ba9757b5f5421 Mon Sep 17 00:00:00 2001 From: pragdave Date: Thu, 7 May 2020 17:36:01 -0500 Subject: [PATCH] remove union return value --- src/animation/Timeline.js | 9 +-------- svg.js.d.ts | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/animation/Timeline.js b/src/animation/Timeline.js index f37cb7a..d175ae6 100644 --- a/src/animation/Timeline.js +++ b/src/animation/Timeline.js @@ -44,17 +44,10 @@ export default class Timeline extends EventTarget { this._stepImmediate = this._stepFn.bind(this, true) } - // returns information on each runner in the timeline. - // (start, duration, end, and runner) - - getSchedule () { - return this._runners.map(makeSchedule) - } - // schedules a runner on the timeline schedule (runner, delay, when) { if (runner == null) { - return this.getSchedule() + return this._runners.map(makeSchedule) } // The start time for the next animation can either be given explicitly, diff --git a/svg.js.d.ts b/svg.js.d.ts index 02dd6df..2d28913 100644 --- a/svg.js.d.ts +++ b/svg.js.d.ts @@ -783,8 +783,8 @@ declare module "@svgdotjs/svg.js" { constructor() constructor(fn: Function) - getSchedule(): ScheduledRunnerInfo[] - schedule(runner?: Runner, delay?: number, when?: string): ( this | ScheduledRunnerInfo[] ) + schedule(runner: Runner, delay?: number, when?: string): this + schedule(): ScheduledRunnerInfo[] unschedule(runner: Runner): this getEndTime(): number updateTime(): this -- 2.39.5