aboutsummaryrefslogtreecommitdiffstats
path: root/svg.js.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'svg.js.d.ts')
-rw-r--r--svg.js.d.ts11
1 files 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<T> = (el: T, index: number, list: T[]) => T
+ type ListEachCallback<T> = (el: T, index: number, list: T[]) => any
// List.js
- class List<T> extends BuiltInArray<T> {
- // I have no clue how to deal with this
- // [key: string]: (...arg0: any[]) => List<T>
- // [key: string]: () => List<any>
- each(fn: ListEachCallback<T>): T[]
- each(...args: any[]): T[]
+ class List<T> extends BuiltInArray<T> implements ElementAlias {
+ each(fn: ListEachCallback<T>): any[]
+ each(name: string, ...args: any[]): any[]
toArray(): T[]
}