From 8383e46f0b8b8b9f7908716cee102bf63d3d2056 Mon Sep 17 00:00:00 2001 From: pragdave Date: Sat, 30 May 2020 19:31:32 -0500 Subject: [PATCH] Fix up List (maybe). ForeignObject still open for discussion --- svg.js.d.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/svg.js.d.ts b/svg.js.d.ts index 213828f..8cb3252 100644 --- a/svg.js.d.ts +++ b/svg.js.d.ts @@ -548,15 +548,12 @@ declare module "@svgdotjs/svg.js" { to(a: any): Morphable; } - type ListEachCallback = (el: T, index: number, list: T[]) => T + type ListEachCallback = (el: T, index: number, list: T[]) => any // List.js - class List extends BuiltInArray { - // I have no clue how to deal with this - // [key: string]: (...arg0: any[]) => List - // [key: string]: () => List - each(fn: ListEachCallback): T[] - each(...args: any[]): T[] + class List extends BuiltInArray implements ElementAlias { + each(fn: ListEachCallback): any[] + each(name: string, ...args: any[]): any[] toArray(): T[] } -- 2.39.5